hello/.g1t/workflows/ci.yml

28 lines685 bytesCodeBlame
1name: CI
2on:
3 push:
4 branches: [main]
5 pull_request:
6 merge_group:
7jobs:
8 check:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v7
12 - uses: dtolnay/rust-toolchain@stable
13 with:
14 components: rustfmt, clippy
15 - uses: actions/cache@v6
16 with:
17 path: |
18 ~/.cargo/registry
19 ~/.cargo/git
20 target
21 key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
22 restore-keys: cargo-${{ runner.os }}-
23 - name: Formatting
24 run: cargo fmt --check
25 - name: Lints
26 run: cargo clippy --all-targets -- -D warnings
27 - name: Tests
28 run: cargo test