|
4 | 4 | pull_request:
|
5 | 5 | branches: ["**"]
|
6 | 6 |
|
| 7 | +env: |
| 8 | + CARGO_TERM_COLOR: always |
| 9 | + |
7 | 10 | jobs:
|
8 |
| - rustfmt: |
9 |
| - name: Format |
10 |
| - runs-on: ubuntu-latest |
11 |
| - steps: |
12 |
| - - name: Checkout sources |
13 |
| - uses: actions/checkout@v4 |
14 |
| - - name: Install nightly toolchain |
15 |
| - uses: dtolnay/rust-toolchain@nightly |
16 |
| - with: |
17 |
| - components: rustfmt |
18 |
| - - run: cargo +nightly fmt --all --check |
19 |
| - clippy: |
20 |
| - name: Lint check |
| 11 | + lint: |
| 12 | + name: lint |
21 | 13 | runs-on: ubuntu-latest
|
22 | 14 | steps:
|
23 | 15 | - name: Checkout sources
|
24 | 16 | uses: actions/checkout@v4
|
25 | 17 | with:
|
26 | 18 | submodules: true
|
27 |
| - - name: Install stable toolchain |
28 |
| - uses: dtolnay/rust-toolchain@stable |
29 |
| - - name: Install protoc |
30 |
| - run: sudo apt-get install protobuf-compiler |
31 |
| - - run: cargo clippy --all -- -D warnings |
32 |
| - tests: |
33 |
| - name: Test |
34 |
| - runs-on: ubuntu-latest |
35 |
| - steps: |
36 |
| - - name: Checkout sources |
37 |
| - uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Setup Rust cache |
| 21 | + uses: Swatinem/rust-cache@v2 |
38 | 22 | with:
|
39 |
| - submodules: true |
40 |
| - - name: Install stable toolchain |
41 |
| - uses: dtolnay/rust-toolchain@stable |
| 23 | + cache-on-failure: true |
| 24 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 25 | + |
| 26 | + - name: Install Rust toolchain |
| 27 | + uses: dtolnay/rust-toolchain@master |
| 28 | + with: |
| 29 | + toolchain: nightly-2025-02-26 |
| 30 | + components: clippy, rustfmt |
| 31 | + |
42 | 32 | - name: Install protoc
|
43 | 33 | run: sudo apt-get install protobuf-compiler
|
44 |
| - - run: cargo test --all-features |
| 34 | + |
| 35 | + - name: Setup just |
| 36 | + uses: extractions/setup-just@v2 |
| 37 | + with: |
| 38 | + just-version: 1.5.0 |
| 39 | + |
| 40 | + - name: Check compilation |
| 41 | + run: cargo check |
| 42 | + |
| 43 | + - name: Check formatting |
| 44 | + run: just fmt-check |
| 45 | + |
| 46 | + - name: Check clippy |
| 47 | + run: just clippy |
| 48 | + |
| 49 | + - name: Run tests |
| 50 | + run: just test |
0 commit comments