Skip to content

Commit 4bc052f

Browse files
committed
Enhance CI configuration for unit tests by adding OS matrix support and removing the Windows build job
1 parent 4a5f431 commit 4bc052f

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

.github/workflows/sqlx.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,19 @@ jobs:
4848
-- -D warnings
4949
5050
test:
51-
name: Unit Test
52-
runs-on: ubuntu-24.04
51+
name: Unit Test ${{ matrix.os }}
52+
strategy:
53+
matrix:
54+
os: [ubuntu-latest, windows-latest]
55+
runs-on: ${{ matrix.os }}
5356
steps:
5457
- uses: actions/checkout@v4
5558
- uses: Swatinem/rust-cache@v2
5659
with:
5760
prefix-key: v1-sqlx
5861
save-if: ${{ false }}
5962
- run: sudo apt-get update && sudo apt-get install -y libodbc2 unixodbc-dev
63+
if: ${{ matrix.os == 'ubuntu-latest' }}
6064
- run: cargo test
6165
--manifest-path sqlx-core/Cargo.toml
6266
--features offline,all-databases,all-types,runtime-tokio-rustls
@@ -347,17 +351,3 @@ jobs:
347351
run: cargo test --no-default-features --features any,odbc,macros,all-types,runtime-tokio-rustls
348352
env:
349353
DATABASE_URL: Driver={SQLite3};Database=./tests/odbc/sqlite.db
350-
351-
windows-build:
352-
name: Windows Build (sqlx-core)
353-
runs-on: windows-latest
354-
needs: check
355-
steps:
356-
- uses: actions/checkout@v4
357-
- uses: Swatinem/rust-cache@v2
358-
with:
359-
prefix-key: v1-sqlx
360-
save-if: ${{ false }}
361-
- name: Build core with ODBC (Windows)
362-
run: |
363-
cargo build --manifest-path sqlx-core/Cargo.toml --no-default-features --features odbc,all-types,runtime-tokio-rustls

0 commit comments

Comments
 (0)