|
1 | 1 | name: CI |
2 | | - |
3 | 2 | on: |
4 | 3 | push: |
5 | | - branches: [ master, main ] |
| 4 | + branches: [master, main] |
6 | 5 | pull_request: |
7 | | - |
8 | 6 | env: |
9 | 7 | CARGO_TERM_COLOR: always |
10 | | - |
11 | 8 | jobs: |
| 9 | + pre-commit: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v5 |
| 13 | + - uses: actions/setup-python@v5 |
| 14 | + with: |
| 15 | + python-version: "3.13" |
| 16 | + - uses: pre-commit/[email protected] |
12 | 17 | style: |
13 | 18 | runs-on: ubuntu-latest |
14 | 19 | steps: |
15 | | - - name: Checkout |
16 | | - uses: actions/checkout@v5 |
17 | | - - uses: dtolnay/rust-toolchain@stable |
18 | | - with: |
19 | | - components: rustfmt,clippy |
20 | | - toolchain: 1.91.1 |
21 | | - - uses: Swatinem/rust-cache@v2 |
22 | | - - name: cargo fmt |
23 | | - run: cargo fmt --all -- --check |
24 | | - - name: cargo clippy |
25 | | - run: cargo clippy -- -D warnings |
| 20 | + - name: Checkout |
| 21 | + uses: actions/checkout@v5 |
| 22 | + - uses: dtolnay/rust-toolchain@stable |
| 23 | + with: |
| 24 | + components: rustfmt,clippy |
| 25 | + toolchain: 1.91.1 |
| 26 | + - uses: Swatinem/rust-cache@v2 |
| 27 | + - name: cargo fmt |
| 28 | + run: cargo fmt --all -- --check |
| 29 | + - name: cargo clippy |
| 30 | + run: cargo clippy -- -D warnings |
26 | 31 | test: |
27 | 32 | runs-on: ubuntu-latest |
28 | 33 | strategy: |
29 | 34 | matrix: |
30 | 35 | rust: ["1.85.0", stable, beta] |
31 | 36 | steps: |
32 | | - - uses: actions/checkout@v5 |
33 | | - - uses: dtolnay/rust-toolchain@stable |
34 | | - with: |
35 | | - toolchain: ${{ matrix.rust }} |
36 | | - - uses: Swatinem/rust-cache@v2 |
37 | | - - name: Test |
38 | | - run: cargo test --all-features |
| 37 | + - uses: actions/checkout@v5 |
| 38 | + - uses: dtolnay/rust-toolchain@stable |
| 39 | + with: |
| 40 | + toolchain: ${{ matrix.rust }} |
| 41 | + - uses: Swatinem/rust-cache@v2 |
| 42 | + - name: Test |
| 43 | + run: cargo test --all-features |
39 | 44 | audit: |
40 | 45 | runs-on: ubuntu-latest |
41 | 46 | steps: |
42 | | - - uses: actions/checkout@v5 |
43 | | - - uses: dtolnay/rust-toolchain@stable |
44 | | - with: |
45 | | - toolchain: stable |
46 | | - - uses: taiki-e/install-action@v2 |
47 | | - with: |
48 | | - tool: cargo-audit |
49 | | - - run: cargo audit |
50 | | - |
| 47 | + - uses: actions/checkout@v5 |
| 48 | + - uses: dtolnay/rust-toolchain@stable |
| 49 | + with: |
| 50 | + toolchain: stable |
| 51 | + - uses: taiki-e/install-action@v2 |
| 52 | + with: |
| 53 | + tool: cargo-audit |
| 54 | + - run: cargo audit |
0 commit comments