|
1 | 1 | name: Ubuntu build |
2 | 2 |
|
3 | 3 | # include "workflow_dispatch" so this workflow can be run manually from the Actions portal |
4 | | -on: [push, pull_request, workflow_dispatch] |
| 4 | +on: [pull_request, workflow_dispatch] |
5 | 5 |
|
6 | 6 | jobs: |
7 | 7 | run_tests: |
|
12 | 12 | strategy: |
13 | 13 | fail-fast: false |
14 | 14 | matrix: |
15 | | - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] |
| 15 | + python-version: ["3.13"] |
16 | 16 |
|
17 | 17 | services: |
18 | 18 |
|
@@ -40,26 +40,26 @@ jobs: |
40 | 40 | ACCEPT_EULA: Y |
41 | 41 | SA_PASSWORD: StrongPassword2025 |
42 | 42 |
|
43 | | - postgres: |
44 | | - image: postgres:13 |
45 | | - env: |
46 | | - POSTGRES_DB: postgres_db |
47 | | - POSTGRES_USER: postgres_user |
48 | | - POSTGRES_PASSWORD: postgres_pwd |
49 | | - ports: |
50 | | - - 5432:5432 |
51 | | - # needed because the postgres container does not provide a healthcheck |
52 | | - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 |
| 43 | +# postgres: |
| 44 | +# image: postgres:13 |
| 45 | +# env: |
| 46 | +# POSTGRES_DB: postgres_db |
| 47 | +# POSTGRES_USER: postgres_user |
| 48 | +# POSTGRES_PASSWORD: postgres_pwd |
| 49 | +# ports: |
| 50 | +# - 5432:5432 |
| 51 | +# # needed because the postgres container does not provide a healthcheck |
| 52 | +# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 |
53 | 53 |
|
54 | 54 | steps: |
55 | 55 |
|
56 | 56 | # to ensure the drivers are installed correctly with apt-get |
57 | 57 | - name: apt-get update |
58 | 58 | run: sudo apt-get update |
59 | 59 |
|
60 | | - - name: Start MySQL service |
61 | | - run: | |
62 | | - sudo systemctl start mysql.service |
| 60 | +# - name: Start MySQL service |
| 61 | +# run: | |
| 62 | +# sudo systemctl start mysql.service |
63 | 63 |
|
64 | 64 | - name: Check initial setup |
65 | 65 | run: | |
@@ -144,28 +144,28 @@ jobs: |
144 | 144 | echo "*** SQL Server 2025" |
145 | 145 | docker exec -i "${{ job.services.mssql2025.id }}" /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P 'StrongPassword2025' -C -Q "SELECT @@VERSION" || sleep 5 |
146 | 146 | docker exec -i "${{ job.services.mssql2025.id }}" /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P 'StrongPassword2025' -C -Q "CREATE DATABASE test" |
147 | | -
|
148 | | - - name: Create test database in PostgreSQL |
149 | | - run: | |
150 | | - echo "*** get version" |
151 | | - psql -c "SELECT version()" |
152 | | - echo "*** create database" |
153 | | - psql -c "CREATE DATABASE test WITH encoding='UTF8' LC_COLLATE='en_US.utf8' LC_CTYPE='en_US.utf8'" |
154 | | - echo "*** list databases" |
155 | | - psql -l |
156 | | - env: |
157 | | - PGHOST: localhost |
158 | | - PGPORT: 5432 |
159 | | - PGDATABASE: postgres_db |
160 | | - PGUSER: postgres_user |
161 | | - PGPASSWORD: postgres_pwd |
162 | | - |
163 | | - - name: Create test database in MySQL |
164 | | - run: | |
165 | | - echo "*** get status" |
166 | | - mysql --user=root --password=root --execute "STATUS" |
167 | | - echo "*** create database" |
168 | | - mysql --user=root --password=root --execute "CREATE DATABASE test" |
| 147 | +# |
| 148 | +# - name: Create test database in PostgreSQL |
| 149 | +# run: | |
| 150 | +# echo "*** get version" |
| 151 | +# psql -c "SELECT version()" |
| 152 | +# echo "*** create database" |
| 153 | +# psql -c "CREATE DATABASE test WITH encoding='UTF8' LC_COLLATE='en_US.utf8' LC_CTYPE='en_US.utf8'" |
| 154 | +# echo "*** list databases" |
| 155 | +# psql -l |
| 156 | +# env: |
| 157 | +# PGHOST: localhost |
| 158 | +# PGPORT: 5432 |
| 159 | +# PGDATABASE: postgres_db |
| 160 | +# PGUSER: postgres_user |
| 161 | +# PGPASSWORD: postgres_pwd |
| 162 | +# |
| 163 | +# - name: Create test database in MySQL |
| 164 | +# run: | |
| 165 | +# echo "*** get status" |
| 166 | +# mysql --user=root --password=root --execute "STATUS" |
| 167 | +# echo "*** create database" |
| 168 | +# mysql --user=root --password=root --execute "CREATE DATABASE test" |
169 | 169 |
|
170 | 170 | - uses: actions/checkout@v4.3.0 |
171 | 171 |
|
@@ -197,43 +197,43 @@ jobs: |
197 | 197 | python -c "import pyodbc; print(pyodbc.version)" |
198 | 198 | echo "*** pyodbc drivers" |
199 | 199 | python -c "import pyodbc; print('\n'.join(sorted(pyodbc.drivers())))" |
200 | | -
|
201 | | - - name: Run PostgreSQL tests |
202 | | - env: |
203 | | - PYODBC_POSTGRESQL: "DRIVER={PostgreSQL Unicode};SERVER=localhost;PORT=5432;UID=postgres_user;PWD=postgres_pwd;DATABASE=test" |
204 | | - run: | |
205 | | - cd "$GITHUB_WORKSPACE" |
206 | | - python -m pytest "./tests/postgresql_test.py" |
207 | | -
|
208 | | - - name: Run MySQL tests |
209 | | - env: |
210 | | - PYODBC_MYSQL: "DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;UID=root;PWD=root;DATABASE=test;CHARSET=utf8mb4" |
211 | | - run: | |
212 | | - cd "$GITHUB_WORKSPACE" |
213 | | - python -m pytest "./tests/mysql_test.py" |
| 200 | +# |
| 201 | +# - name: Run PostgreSQL tests |
| 202 | +# env: |
| 203 | +# PYODBC_POSTGRESQL: "DRIVER={PostgreSQL Unicode};SERVER=localhost;PORT=5432;UID=postgres_user;PWD=postgres_pwd;DATABASE=test" |
| 204 | +# run: | |
| 205 | +# cd "$GITHUB_WORKSPACE" |
| 206 | +# python -m pytest "./tests/postgresql_test.py" |
| 207 | +# |
| 208 | +# - name: Run MySQL tests |
| 209 | +# env: |
| 210 | +# PYODBC_MYSQL: "DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;UID=root;PWD=root;DATABASE=test;CHARSET=utf8mb4" |
| 211 | +# run: | |
| 212 | +# cd "$GITHUB_WORKSPACE" |
| 213 | +# python -m pytest "./tests/mysql_test.py" |
214 | 214 |
|
215 | 215 | - name: Run SQL Server 2019 tests |
216 | 216 | env: |
217 | 217 | PYODBC_SQLSERVER: "DRIVER={ODBC Driver 18 for SQL Server};SERVER=localhost,1402;UID=sa;PWD=StrongPassword2019;DATABASE=test;Encrypt=Optional" |
218 | 218 | run: | |
219 | 219 | cd "$GITHUB_WORKSPACE" |
220 | | - python -m pytest "./tests/sqlserver_test.py" |
| 220 | + python -m pytest -s "./tests/sqlserver_test.py" |
221 | 221 |
|
222 | 222 | - name: Run SQL Server 2022 tests |
223 | 223 | env: |
224 | 224 | PYODBC_SQLSERVER: "DRIVER={ODBC Driver 18 for SQL Server};SERVER=localhost,1403;UID=sa;PWD=StrongPassword2022;DATABASE=test;Encrypt=Optional" |
225 | 225 | run: | |
226 | 226 | cd "$GITHUB_WORKSPACE" |
227 | | - python -m pytest "./tests/sqlserver_test.py" |
| 227 | + python -m pytest -s "./tests/sqlserver_test.py" |
228 | 228 |
|
229 | 229 | - name: Run SQL Server 2025 tests |
230 | 230 | env: |
231 | 231 | PYODBC_SQLSERVER: "DRIVER={ODBC Driver 18 for SQL Server};SERVER=localhost,1404;UID=sa;PWD=StrongPassword2025;DATABASE=test;Encrypt=Optional" |
232 | 232 | run: | |
233 | 233 | cd "$GITHUB_WORKSPACE" |
234 | | - python -m pytest "./tests/sqlserver_test.py" |
235 | | -
|
236 | | - - name: Run SQLite tests |
237 | | - run: | |
238 | | - cd "$GITHUB_WORKSPACE" |
239 | | - python -m pytest "./tests/sqlite_test.py" |
| 234 | + python -m pytest -s "./tests/sqlserver_test.py" |
| 235 | +# |
| 236 | +# - name: Run SQLite tests |
| 237 | +# run: | |
| 238 | +# cd "$GITHUB_WORKSPACE" |
| 239 | +# python -m pytest "./tests/sqlite_test.py" |
0 commit comments