aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/rust.yml
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-06-23 10:33:21 +0100
committerdiogo464 <[email protected]>2025-06-23 10:33:21 +0100
commitf2d3af390bf9fc924c2b1bd4c2b4fb3b50819307 (patch)
treecc19d97321e55b3a6536ea98c677b5f9f749fb82 /.github/workflows/rust.yml
parent36e1c3debd448d39196c2289feb2e96f2ecd0f26 (diff)
Add GitHub Actions workflow for Rust testing
- Runs tests on push and pull requests to main branch - Includes formatting check, clippy linting, build, and test steps - Uses cargo caching for improved performance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Diffstat (limited to '.github/workflows/rust.yml')
-rw-r--r--.github/workflows/rust.yml43
1 files changed, 43 insertions, 0 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
new file mode 100644
index 0000000..9be2f41
--- /dev/null
+++ b/.github/workflows/rust.yml
@@ -0,0 +1,43 @@
1name: Rust
2
3on:
4 push:
5 branches: [ main ]
6 pull_request:
7 branches: [ main ]
8
9env:
10 CARGO_TERM_COLOR: always
11
12jobs:
13 test:
14 runs-on: ubuntu-latest
15
16 steps:
17 - uses: actions/checkout@v4
18
19 - name: Install Rust
20 uses: dtolnay/rust-toolchain@stable
21
22 - name: Cache cargo registry
23 uses: actions/cache@v3
24 with:
25 path: |
26 ~/.cargo/registry
27 ~/.cargo/git
28 target
29 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30 restore-keys: |
31 ${{ runner.os }}-cargo-
32
33 - name: Check formatting
34 run: cargo fmt --check
35
36 - name: Run clippy
37 run: cargo clippy -- -D warnings
38
39 - name: Build
40 run: cargo build --verbose
41
42 - name: Run tests
43 run: cargo test --verbose \ No newline at end of file