Skip to content

Commit

Permalink
postgres smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
chipitsine committed Oct 13, 2024
1 parent 9e6b264 commit 8343f0e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
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

0 comments on commit 8343f0e

Please sign in to comment.