|
1 | 1 | name: CI |
2 | 2 | on: |
3 | | - push: |
4 | | - branches: |
5 | | - - main |
6 | | - - ci |
7 | | - pull_request: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + - ci |
| 7 | + pull_request: |
8 | 8 |
|
9 | 9 | env: |
10 | | - SQLX_OFFLINE: true |
| 10 | + SQLX_OFFLINE: true |
11 | 11 |
|
12 | 12 | jobs: |
13 | | - rustfmt: |
14 | | - runs-on: ubuntu-latest |
15 | | - steps: |
16 | | - - name: Checkout |
17 | | - uses: actions/checkout@v3 |
18 | | - |
19 | | - - name: Nightly Rust |
20 | | - uses: actions-rs/toolchain@v1 |
21 | | - with: |
22 | | - toolchain: nightly |
23 | | - components: rustfmt |
24 | | - |
25 | | - - name: Rustfmt |
26 | | - run: cargo fmt -- --check |
27 | | - |
28 | | - clippy: |
29 | | - runs-on: ubuntu-latest |
30 | | - steps: |
31 | | - - name: Checkout |
32 | | - uses: actions/checkout@v3 |
33 | | - |
34 | | - - name: Stable Rust |
35 | | - uses: actions-rs/toolchain@v1 |
36 | | - with: |
37 | | - toolchain: stable |
38 | | - components: clippy |
39 | | - |
40 | | - - name: Clippy |
41 | | - run: cargo clippy --all-targets -- -D warnings |
42 | | - |
43 | | - test: |
44 | | - runs-on: ubuntu-latest |
45 | | - steps: |
46 | | - - name: Checkout |
47 | | - uses: actions/checkout@v3 |
48 | | - |
49 | | - - name: Stable Rust |
50 | | - uses: actions-rs/toolchain@v1 |
51 | | - with: |
52 | | - toolchain: stable |
53 | | - |
54 | | - - name: Test all targets |
55 | | - run: cargo test --all-targets |
56 | | - |
57 | | - - name: Test docs |
58 | | - run: cargo test --doc |
59 | | - |
60 | | - typos: |
61 | | - runs-on: ubuntu-latest |
62 | | - steps: |
63 | | - - name: Checkout |
64 | | - uses: actions/checkout@v3 |
65 | | - |
66 | | - - name: Check typos in `rust` folder |
67 | | - uses: crate-ci/typos@master |
68 | | - with: |
69 | | - files: . |
70 | | - |
71 | | - cargo_sort: |
72 | | - runs-on: ubuntu-latest |
73 | | - steps: |
74 | | - - name: Checkout |
75 | | - uses: actions/checkout@v3 |
76 | | - |
77 | | - - name: Stable Rust |
78 | | - uses: actions-rs/toolchain@v1 |
79 | | - with: |
80 | | - toolchain: stable |
81 | | - |
82 | | - - name: Install cargo-sort |
83 | | - run: cargo install --locked cargo-sort |
84 | | - |
85 | | - - name: Check `Cargo.toml` sort |
86 | | - run: cargo sort -c |
87 | | - |
88 | | - machete: |
89 | | - runs-on: ubuntu-latest |
90 | | - steps: |
91 | | - - name: Checkout |
92 | | - uses: actions/checkout@v3 |
93 | | - |
94 | | - - name: Stable Rust |
95 | | - uses: actions-rs/toolchain@v1 |
96 | | - with: |
97 | | - toolchain: stable |
98 | | - |
99 | | - - name: Install `cargo-machete` |
100 | | - run: cargo install --locked cargo-machete |
101 | | - |
102 | | - - name: Check unused Cargo dependencies |
103 | | - run: cargo machete |
| 13 | + rustfmt: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - name: Checkout |
| 17 | + uses: actions/checkout@v4 |
| 18 | + |
| 19 | + - name: Nightly Rust |
| 20 | + uses: dtolnay/rust-toolchain@master |
| 21 | + with: |
| 22 | + toolchain: nightly |
| 23 | + components: rustfmt |
| 24 | + |
| 25 | + - name: Rustfmt |
| 26 | + run: cargo +nightly fmt -- --check |
| 27 | + |
| 28 | + clippy: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + steps: |
| 31 | + - name: Checkout |
| 32 | + uses: actions/checkout@v4 |
| 33 | + |
| 34 | + - name: Stable Rust |
| 35 | + uses: dtolnay/rust-toolchain@master |
| 36 | + with: |
| 37 | + toolchain: stable |
| 38 | + components: clippy |
| 39 | + |
| 40 | + - name: Clippy |
| 41 | + run: cargo clippy --all-targets --all-features -- -D warnings |
| 42 | + |
| 43 | + rustdoc: |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + - name: Checkout |
| 47 | + uses: actions/checkout@v4 |
| 48 | + |
| 49 | + - name: Stable Rust |
| 50 | + uses: dtolnay/rust-toolchain@master |
| 51 | + with: |
| 52 | + toolchain: stable |
| 53 | + |
| 54 | + - name: Rustdoc |
| 55 | + run: cargo rustdoc --all-features -- -D warnings |
| 56 | + |
| 57 | + test: |
| 58 | + runs-on: ubuntu-latest |
| 59 | + steps: |
| 60 | + - name: Checkout |
| 61 | + uses: actions/checkout@v4 |
| 62 | + |
| 63 | + - name: Stable Rust |
| 64 | + uses: dtolnay/rust-toolchain@master |
| 65 | + with: |
| 66 | + toolchain: stable |
| 67 | + |
| 68 | + - name: Test all targets |
| 69 | + run: cargo test --all-targets |
| 70 | + |
| 71 | + - name: Test docs |
| 72 | + run: cargo test --doc |
| 73 | + |
| 74 | + typos: |
| 75 | + runs-on: ubuntu-latest |
| 76 | + steps: |
| 77 | + - name: Checkout |
| 78 | + uses: actions/checkout@v4 |
| 79 | + |
| 80 | + - name: Check typos |
| 81 | + uses: crate-ci/typos@master |
| 82 | + with: |
| 83 | + files: . |
| 84 | + |
| 85 | + cargo_sort: |
| 86 | + runs-on: ubuntu-latest |
| 87 | + steps: |
| 88 | + - name: Checkout |
| 89 | + uses: actions/checkout@v4 |
| 90 | + |
| 91 | + - name: Stable Rust |
| 92 | + uses: dtolnay/rust-toolchain@master |
| 93 | + with: |
| 94 | + toolchain: stable |
| 95 | + |
| 96 | + - name: Install cargo-sort |
| 97 | + run: cargo install --locked cargo-sort |
| 98 | + |
| 99 | + - name: Check `Cargo.toml` sort |
| 100 | + run: cargo sort -c |
| 101 | + |
| 102 | + shear: |
| 103 | + runs-on: ubuntu-latest |
| 104 | + steps: |
| 105 | + - name: Checkout |
| 106 | + uses: actions/checkout@v4 |
| 107 | + |
| 108 | + - name: Stable Rust |
| 109 | + uses: dtolnay/rust-toolchain@master |
| 110 | + with: |
| 111 | + toolchain: stable |
| 112 | + |
| 113 | + - name: Install `cargo-shear` |
| 114 | + run: cargo install --locked cargo-shear |
| 115 | + |
| 116 | + - name: Check unused Cargo dependencies |
| 117 | + run: cargo shear |
0 commit comments