Skip to content

Commit 2c3c9f5

Browse files
committed
clean up odbc testing on ci
1 parent eebdcd9 commit 2c3c9f5

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

.github/workflows/sqlx.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
cargo clippy \
4646
--no-default-features \
4747
--all-targets \
48-
--features offline,all-databases,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }} \
48+
--features offline,all-databases,all-types,migrate,runtime-${{ matrix.runtime }}-${{ matrix.tls }} \
4949
-- -D warnings
5050
5151
test:
@@ -366,28 +366,11 @@ jobs:
366366
cp tests/odbc.ini ~/.odbc.ini
367367
odbcinst -q -s || true
368368
echo "select 1;" | isql -v SQLX_PG_5432 || true
369-
- name: Run clippy for odbc
370-
run: |
371-
cargo clippy \
372-
--no-default-features \
373-
--features odbc,all-types,runtime-tokio-rustls,macros,migrate \
374-
-- -D warnings
375369
- name: Run ODBC tests (PostgreSQL DSN)
376-
run: |
377-
cargo test --no-default-features --features any,odbc,macros,all-types,runtime-tokio-rustls any_odbc -- --test-threads=1
378-
cargo test --no-default-features --features odbc,all-types,runtime-tokio-rustls -- --test odbc --test-threads=1
379-
cargo test --no-default-features --features odbc,all-types,runtime-tokio-rustls -- --test odbc-types --test-threads=1
370+
run: cargo test --no-default-features --features any,odbc,macros,all-types,runtime-tokio-rustls -- --test-threads=1
380371
env:
381372
DATABASE_URL: DSN=SQLX_PG_5432;UID=postgres;PWD=password
382-
- name: Detect SQLite ODBC driver name
383-
id: detect_sqlite
384-
run: |
385-
if odbcinst -q -d | grep -q '^\[SQLite3\]'; then echo "driver=SQLite3" >> $GITHUB_OUTPUT; elif odbcinst -q -d | grep -q '^\[SQLite\]'; then echo "driver=SQLite" >> $GITHUB_OUTPUT; else echo 'No SQLite ODBC driver installed'; exit 1; fi
386373
- name: Run ODBC tests (SQLite driver)
387-
run: |
388-
echo "Using SQLite ODBC driver: ${{ steps.detect_sqlite.outputs.driver }}"
389-
cargo test --no-default-features --features any,odbc,macros,all-types,runtime-tokio-rustls any_odbc -- --test-threads=1
390-
cargo test --no-default-features --features odbc,all-types,runtime-tokio-rustls -- --test odbc --test-threads=1
391-
cargo test --no-default-features --features odbc,all-types,runtime-tokio-rustls -- --test odbc-types --test-threads=1
374+
run: cargo test --no-default-features --features any,odbc,macros,all-types,runtime-tokio-rustls -- --test-threads=1
392375
env:
393-
DATABASE_URL: Driver={${{ steps.detect_sqlite.outputs.driver }}};Database=./tests/odbc/sqlite.db
376+
DATABASE_URL: Driver={SQLite3};Database=./tests/odbc/sqlite.db

0 commit comments

Comments
 (0)