Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: postgres smoke test #193

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/postgres_odbc.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[PostgreSQL-server]
Description=PostgreSQL server
Driver=PostgreSQL Unicode
Servername = 127.0.0.1
Username = test_user
Password = test_password
Database = test_db
Port = 5432

[PostgreSQL ANSI]
Description = PostgreSQL ODBC driver (ANSI version)
Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so
Setup = libodbcpsqlS.so
Debug = 0
CommLog = 1

[PostgreSQL Unicode]
Description = PostgreSQL ODBC driver (Unicode version)
Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
Setup = libodbcpsqlS.so
Debug = 0
CommLog = 1

22 changes: 20 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ jobs:
name: ${{ matrix.cc }}
runs-on: ubuntu-24.04
services:
postgres:
image: postgres
env:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mariadb:
image: mariadb:latest
env:
Expand All @@ -31,11 +44,11 @@ jobs:
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libltdl-dev odbc-mariadb
sudo apt-get install -y libltdl-dev odbc-mariadb odbc-postgresql
- name: configure
run: |
autoreconf -iv
CC=${{ matrix.cc }} CFLAGS="-ggdb -fsanitize=address" ./configure --prefix=/ --exec-prefix=/
CC=${{ matrix.cc }} CFLAGS="-ggdb -fsanitize=address" ./configure --prefix=/usr
- name: build
run: |
##make AM_MAKEFLAGS=CFLAGS=-Werror
Expand All @@ -46,4 +59,9 @@ jobs:
sudo -E ./exe/.libs/odbcinst -i -d -f .github/MariaDB_odbc_driver_template.ini
./exe/.libs/odbcinst -i -s -h -f .github/MariaDB_odbc_data_source_template.ini
echo 'SELECT VERSION();' | ./exe/.libs/isql -v MariaDB-server -b
- name: postgres smoke test
run: |
./exe/.libs/odbcinst -i -s -h -f .github/postgres_odbc.ini
echo 'SELECT VERSION();' | ./exe/.libs/isql -v PostgreSQL-server -b


2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.la
*.pc
*.lo
*.o
INSTALL
Expand Down