Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Rust CI

on:
push:
branches: ['**']
pull_request:
branches: ['**']

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy, rustfmt
override: true

- name: Cache Cargo Dependencies
uses: Swatinem/rust-cache@v2

- name: Check Code Formatting
run: cargo fmt --all -- --check

- name: Run Clippy (Linter)
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build Project
run: cargo build --verbose

- name: Run Tests
run: cargo test --verbose
Loading