|
| 1 | +name: Clippy |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + checks: write |
| 10 | + |
| 11 | +env: |
| 12 | + CARGO_TERM_COLOR: always |
| 13 | + |
| 14 | +jobs: |
| 15 | + clippy-rt: |
| 16 | + name: clippy (sqlx-rt-oldapi) • ${{ matrix.rt }} |
| 17 | + runs-on: ubuntu-latest |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + rt: |
| 22 | + - runtime-tokio-native-tls |
| 23 | + - runtime-tokio-rustls |
| 24 | + - runtime-async-std-native-tls |
| 25 | + - runtime-async-std-rustls |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v4 |
| 28 | + - name: Install system deps |
| 29 | + run: sudo apt-get update -y && sudo apt-get install -y pkg-config libssl-dev |
| 30 | + - uses: dtolnay/rust-toolchain@nightly |
| 31 | + with: |
| 32 | + components: clippy |
| 33 | + - uses: Swatinem/rust-cache@v2 |
| 34 | + with: |
| 35 | + cache-all-crates: true |
| 36 | + - name: Run clippy (rt) |
| 37 | + run: | |
| 38 | + cargo clippy -p sqlx-rt-oldapi --no-default-features --features "${{ matrix.rt }}" --all-targets -- -D warnings |
| 39 | +
|
| 40 | + clippy-core: |
| 41 | + name: clippy (sqlx-core-oldapi) • ${{ matrix.db }} • ${{ matrix.rt }} |
| 42 | + runs-on: ubuntu-latest |
| 43 | + strategy: |
| 44 | + fail-fast: false |
| 45 | + matrix: |
| 46 | + db: [postgres, mysql, sqlite, mssql, any] |
| 47 | + rt: [runtime-tokio-rustls] |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v4 |
| 50 | + - name: Install system deps |
| 51 | + run: sudo apt-get update -y && sudo apt-get install -y pkg-config libssl-dev |
| 52 | + - uses: dtolnay/rust-toolchain@nightly |
| 53 | + with: |
| 54 | + components: clippy |
| 55 | + - uses: Swatinem/rust-cache@v2 |
| 56 | + with: |
| 57 | + cache-all-crates: true |
| 58 | + - name: Run clippy (core) |
| 59 | + run: | |
| 60 | + cargo clippy -p sqlx-core-oldapi --no-default-features --features "${{ matrix.rt }},${{ matrix.db }}" --all-targets -- -D warnings |
| 61 | +
|
| 62 | + clippy-root: |
| 63 | + name: clippy (sqlx-oldapi) • ${{ matrix.combo }} |
| 64 | + runs-on: ubuntu-latest |
| 65 | + strategy: |
| 66 | + fail-fast: false |
| 67 | + matrix: |
| 68 | + combo: |
| 69 | + - "runtime-tokio-rustls,postgres,macros" |
| 70 | + - "runtime-tokio-rustls,sqlite,macros" |
| 71 | + - "runtime-tokio-rustls,mysql,macros" |
| 72 | + - "runtime-async-std-rustls,postgres,macros" |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v4 |
| 75 | + - name: Install system deps |
| 76 | + run: sudo apt-get update -y && sudo apt-get install -y pkg-config libssl-dev |
| 77 | + - uses: dtolnay/rust-toolchain@nightly |
| 78 | + with: |
| 79 | + components: clippy |
| 80 | + - uses: Swatinem/rust-cache@v2 |
| 81 | + with: |
| 82 | + cache-all-crates: true |
| 83 | + - name: Run clippy (root) |
| 84 | + run: | |
| 85 | + cargo clippy -p sqlx-oldapi --no-default-features --features "${{ matrix.combo }}" --all-targets -- -D warnings |
| 86 | +
|
0 commit comments