|
14 | 14 | - uses: actions/checkout@v4 |
15 | 15 | - run: cargo fmt --all -- --check |
16 | 16 |
|
| 17 | + clippy: |
| 18 | + name: Clippy |
| 19 | + runs-on: ubuntu-22.04 |
| 20 | + strategy: |
| 21 | + matrix: |
| 22 | + runtime: [async-std, tokio] |
| 23 | + tls: [native-tls, rustls] |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v4 |
| 26 | + - uses: Swatinem/rust-cache@v2 |
| 27 | + - name: Run clippy for core with all features |
| 28 | + run: | |
| 29 | + cargo clippy --manifest-path sqlx-core/Cargo.toml \ |
| 30 | + --no-default-features \ |
| 31 | + --features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }} \ |
| 32 | + -- -D warnings |
| 33 | + env: |
| 34 | + RUSTFLAGS: -D warnings |
| 35 | + - name: Run clippy for root with all features |
| 36 | + run: | |
| 37 | + cargo clippy \ |
| 38 | + --no-default-features \ |
| 39 | + --features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }},macros \ |
| 40 | + -- -D warnings |
| 41 | + env: |
| 42 | + RUSTFLAGS: -D warnings |
| 43 | + - name: Run clippy for all targets |
| 44 | + run: | |
| 45 | + cargo clippy \ |
| 46 | + --no-default-features \ |
| 47 | + --all-targets \ |
| 48 | + --features offline,all-databases,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }} \ |
| 49 | + -- -D warnings |
| 50 | + env: |
| 51 | + RUSTFLAGS: -D warnings |
| 52 | + |
17 | 53 | check: |
18 | 54 | name: Check |
19 | 55 | runs-on: ubuntu-22.04 |
@@ -98,6 +134,27 @@ jobs: |
98 | 134 | name: cargo-sqlx-${{ matrix.target }} |
99 | 135 | path: ${{ matrix.bin }} |
100 | 136 |
|
| 137 | + clippy-per-db: |
| 138 | + name: Clippy per Database |
| 139 | + runs-on: ubuntu-22.04 |
| 140 | + strategy: |
| 141 | + matrix: |
| 142 | + db: [postgres, mysql, sqlite, mssql] |
| 143 | + runtime: [tokio] |
| 144 | + tls: [rustls] |
| 145 | + needs: clippy |
| 146 | + steps: |
| 147 | + - uses: actions/checkout@v4 |
| 148 | + - uses: Swatinem/rust-cache@v2 |
| 149 | + - name: Run clippy for ${{ matrix.db }} |
| 150 | + run: | |
| 151 | + cargo clippy \ |
| 152 | + --no-default-features \ |
| 153 | + --features ${{ matrix.db }},all-types,runtime-${{ matrix.runtime }}-${{ matrix.tls }},macros,migrate \ |
| 154 | + -- -D warnings |
| 155 | + env: |
| 156 | + RUSTFLAGS: -D warnings |
| 157 | + |
101 | 158 | sqlite: |
102 | 159 | name: SQLite |
103 | 160 | runs-on: ubuntu-22.04 |
|
0 commit comments