From 8343f0e9b8ed7b60d2f43578f1907ceb20686b35 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sun, 13 Oct 2024 21:56:48 +0200 Subject: [PATCH] postgres smoke test --- .github/postgres_odbc.ini | 23 +++++++++++++++++++++++ .github/workflows/main.yml | 22 ++++++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/postgres_odbc.ini diff --git a/.github/postgres_odbc.ini b/.github/postgres_odbc.ini new file mode 100644 index 0000000..02b5dbd --- /dev/null +++ b/.github/postgres_odbc.ini @@ -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 + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e5a3f05..238966a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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 @@ -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 +