Skip to content

Commit cc22f0a

Browse files
committed
ci: install drivers for test vendored-unix-odbc
1 parent aa43670 commit cc22f0a

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,30 @@ jobs:
142142
POSTGRES_PASSWORD: test
143143

144144
steps:
145-
- name: Checkout
146-
uses: actions/checkout@v4
147145
- name: Install latests rust toolchain
148146
uses: actions-rs/toolchain@v1
149147
with:
150148
toolchain: stable
151-
default: true
149+
profile: minimal
152150
override: true
151+
- name: Install ODBC Drivers
152+
run: |
153+
apt-get update
154+
apt-get install -y unixodbc-dev odbc-postgresql msodbcsql18
155+
# Fix PostgreSQL driver paths
156+
sed --in-place 's/psqlodbca.so/\/usr\/lib\/x86_64-linux-gnu\/odbc\/psqlodbca.so/' /etc/odbcinst.ini
157+
sed --in-place 's/psqlodbcw.so/\/usr\/lib\/x86_64-linux-gnu\/odbc\/psqlodbcw.so/' /etc/odbcinst.ini
158+
shell: sudo bash {0}
159+
- name: Print odbcinst.ini
160+
run: cat /etc/odbcinst.ini
161+
- name: Checkout
162+
uses: actions/checkout@v5
163+
# selecting a toolchain either by action or manual `rustup` calls should happen
164+
# before the plugin, as the cache uses the current rustc version as its cache key
165+
- name: Rust build cache
166+
uses: Swatinem/rust-cache@v2
167+
- name: Build
168+
run: cargo build --features vendored-unix-odbc
153169
- name: test
154170
run: |
155171
cargo test --features vendored-unix-odbc -- --skip maria_db

0 commit comments

Comments
 (0)