poulpy/.github/workflows/ci.yml
.github/workflows/ci.ymlRaw
1name: CI
2
3on:
4 push:
5 branches: [ main ]
6 pull_request:
7 branches: [ main ]
8
9jobs:
10 build-and-test:
11 runs-on: ubuntu-latest
12
13 steps:
14 - name: Checkout code
15 uses: actions/checkout@v4
16 with:
17 submodules: recursive
18
19 - name: Install Rust nightly
20 uses: dtolnay/rust-toolchain@nightly
21 with:
22 components: clippy, rustfmt
23
24 - name: Cache cargo dependencies
25 uses: actions/cache@v4
26 with:
27 path: |
28 ~/.cargo/registry
29 ~/.cargo/git
30 target
31 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
32 restore-keys: |
33 ${{ runner.os }}-cargo-
34
35 - name: Build
36 run: cargo build --all-targets
37
38 - name: Clippy (deny warnings)
39 run: cargo clippy --workspace --all-targets --all-features -- -D warnings
40
41 - name: rustfmt (check only)
42 run: cargo fmt --all --check
43
44 - name: Run tests
45 run: cargo test --all