Skip to content

[pull] master from MarketSquare:master #6

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

Open
wants to merge 294 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
294 commits
Select commit Hold shift + click to select a range
c1075f4
[CI] Workflow for Excel tests
amochin Jun 20, 2023
3085d7d
[CI] wait for IBM DB2 to be up and running
amochin Jun 21, 2023
fbbca36
[CI] trying to fix IBMDB2 container issue with mounting
amochin Jun 21, 2023
3a6a8ae
description command - different response from mysql via pyodbc
amochin Jun 21, 2023
0cc76b5
[CI] trying to fix the path to ibm db
amochin Jun 21, 2023
b874929
[CI] trying to fix the path to ibm db
amochin Jun 21, 2023
10e814a
[CI] remove excel tests workflow as it requires odbc driver
amochin Jun 21, 2023
232663e
Test "Connect Using Custom Params"
amochin Jun 21, 2023
60b11d0
typo in param name
amochin Jun 21, 2023
f20d509
[CI] Remove IBM DB2 tests - docker container is causing problems
amochin Jun 21, 2023
074e546
fix description tests for MySQL via pyodbc
amochin Jun 21, 2023
7cdb4d2
Fix test 'Using Custom Params' for oracledb
amochin Jun 21, 2023
74a36b0
[CI] Fake port to avoid sqlite3 tests failing
amochin Jun 21, 2023
4ae8e43
Try fixing 'custom params' test for pyodbc setting the driver
amochin Jun 21, 2023
78ef687
Update status of tests/workflows
amochin Jun 21, 2023
9a8a447
Forgot commas
amochin Jun 21, 2023
ac12d6c
Fix 'custom params' test for sqlite3
amochin Jun 21, 2023
583fe97
fix #174 - remove trailing semicolons in the sql statement
amochin Jun 21, 2023
dd69a3d
Merge branch '162' of https://github.com/robinmatz/Robotframework-Dat…
amochin Jun 21, 2023
5f8f9ba
#162 Tests for custom assertion messages in new structure
amochin Jun 21, 2023
573d5fe
Merge branch 'robinmatz-162' into dev
amochin Jun 21, 2023
4b3fc2d
fix some tests docs
amochin Jun 23, 2023
e9b44e0
some tests for encoding
amochin Jun 23, 2023
ef52808
launch config for cx_oracle
amochin Jun 23, 2023
d7b016b
fix #179 - comprehensive error messages in assertion keywords
amochin Jun 23, 2023
d980ad6
fix #166 - support new oracledb driver
amochin Jun 23, 2023
a943dcc
Set charset when connecting via pyodbc
amochin Jun 23, 2023
e0c3d40
Merge branch 'dev' into as-dict-python-modules
amochin Jun 23, 2023
2b91cb8
Merge pull request #150 from emanlove/as-dict-python-modules
amochin Jun 23, 2023
5f3cefd
Hide DB connection password in output logs
amochin Jul 10, 2023
841260a
#174 - omitting semicolon at the end of an SQL statement is now defin…
amochin Jul 11, 2023
46d6120
Improve running SQL script files - separate statements more precisely…
amochin Jul 11, 2023
9f4d18f
Improve the 'Call stored procedure' keyword:
amochin Jul 11, 2023
a4f6f2b
Add a test 'Simple Select With Multiple Rows'
amochin Jul 11, 2023
7ff91a6
Tests for stored procedures - change SQL script for PostgreSQL to plp…
amochin Jul 11, 2023
a49f7e1
Fix #111 - support semicolons in values in SQL script files
amochin Jul 13, 2023
8436c62
Changelog
amochin Jul 13, 2023
d4aa009
Don't output passwords into logs - forgot some
amochin Jul 13, 2023
66f45e4
Hide passwords in logs even in case of using the 'connect using custo…
amochin Jul 13, 2023
a74ebdb
Remove dist
amochin Jul 14, 2023
b778950
Remove old travis pipeline setup
amochin Jul 14, 2023
175cffe
Clean dependencies file - remove commented modules and RF minimum ver…
amochin Jul 14, 2023
3d662f5
Bump version to 1.3.0
amochin Jul 14, 2023
5f4d5c9
Remove todo comment from test code
amochin Jul 14, 2023
b4004b5
Update link to repository in setup.py
amochin Jul 14, 2023
3720a6b
Update the readme
amochin Jul 14, 2023
9d26328
Improve some docs about local testing
amochin Jul 14, 2023
7ccd4e9
Workflow for GH Pages - publish keyword docs
amochin Jul 17, 2023
ad3fcc4
Pages - try uploading the html file
amochin Jul 17, 2023
c3b7fc5
Pages - try using the index.html
amochin Jul 17, 2023
3ff1533
Readme - link to keyword docs on GitHub Pages
amochin Jul 17, 2023
2cef42c
Update docs
amochin Jul 17, 2023
38c160d
Changelog file not needed anymore
amochin Jul 17, 2023
aa75252
Merge branch 'dev' into master
amochin Jul 17, 2023
011b6f7
Update description for PyPi
amochin Jul 17, 2023
2421f3f
Add dist to gitignore
amochin Jul 17, 2023
f605c72
Update package setup info using pyproject.toml
amochin Jul 17, 2023
0f3069b
Package building requires no excel-lib
amochin Jul 18, 2023
42ade3e
Package metadata - short license text
amochin Jul 18, 2023
309ef64
Bump version to 1.3.1
amochin Jul 20, 2023
a9c4fb4
pyodbc - set port as separate parameter
amochin Jul 20, 2023
6f09044
connect pyodbc - update log message
amochin Jul 20, 2023
f4dcd04
Forgot the charset param in the log string
amochin Jul 20, 2023
54dcba1
Fix #181 - return to the old 'server,port' syntax in ODBC connection …
amochin Jul 20, 2023
27866b6
Debugging...
amochin Jul 20, 2023
190d886
remove debugging comment
amochin Jul 20, 2023
7c4ceba
#181 different syntax for pyodbc connection string based on SQL drive…
amochin Jul 20, 2023
107e70a
Add precommit configuration and refactor files
bhirsz Aug 8, 2023
123bc4c
Merge pull request #182 from bhirsz/refactor_with_precommits
amochin Oct 13, 2023
dc7e762
remove deprecated python linting setting
amochin Nov 5, 2023
d71fb8c
Option "driverMode" to support oracledb "thick" mode
Rudolf-AT Nov 5, 2023
7e84d97
Merge pull request #189 from Rudolf-AT/master
amochin Nov 5, 2023
e5b9ae9
Replace string %s with fstrings
bhirsz Nov 5, 2023
439d33e
Docs fixes
bhirsz Nov 5, 2023
7d7ab02
Normalize local variable naming
bhirsz Nov 5, 2023
6f364b1
Simplify conditions
bhirsz Nov 5, 2023
1ce4a54
Fix docs typo
bhirsz Nov 5, 2023
d65523f
Refactor returnAsDict query mode
bhirsz Nov 5, 2023
6d240af
Add typing
bhirsz Nov 5, 2023
023562e
Driver mode is relevant for oracle only
amochin Nov 5, 2023
9950c9c
WIP - Tests for oracledb mode switch
amochin Nov 5, 2023
fdc388b
Merge pull request #190 from MarketSquare/refactor_logs_docs
amochin Nov 6, 2023
835c772
Merge branch 'master' into refactor_return_as_dict
amochin Nov 6, 2023
b889b6c
Typo in var "all_rows"
amochin Nov 6, 2023
2286aed
Merge pull request #191 from MarketSquare/refactor_return_as_dict
amochin Nov 6, 2023
9b9c952
Add typing
bhirsz Nov 5, 2023
5614e97
Fix numRows int -> str type because of ascii encoding
bhirsz Nov 6, 2023
6e2e799
Merge branch 'add_typing' of https://github.com/MarketSquare/Robotfra…
bhirsz Nov 6, 2023
ce260dd
Fix numRows int -> str type because of ascii encoding
bhirsz Nov 6, 2023
21770c2
Pipeline for oracle_db thick mode switch
amochin Nov 6, 2023
61380e8
Fix file name
amochin Nov 6, 2023
7b3a068
Quote path in variable
amochin Nov 6, 2023
516e076
Tests for oracle thin and thick mode require closing the connection
amochin Nov 6, 2023
245d6a6
Fix expected error message in tests
amochin Nov 6, 2023
146e47f
Oracle thick mode tests - clean data in test teardown
amochin Nov 6, 2023
44711c7
[debug] switch Oracle thick mode tests for debugging
amochin Nov 6, 2023
b435289
copy oracle client libs in usual search path for test without lib dir…
amochin Nov 6, 2023
cbfadcb
[debug] try if adding module reload helps resetting oracledb connecti…
amochin Nov 6, 2023
19e7cd5
Forgot flag for copy command
amochin Nov 6, 2023
7a32d51
Copy as sudo
amochin Nov 6, 2023
1c4e651
reload a module, not a name
amochin Nov 6, 2023
7004d11
EVERYWHERE reload a module, not a name
amochin Nov 6, 2023
21b761a
module reload didn't work, revert
amochin Nov 6, 2023
d855f8c
Reorder tests for thick/thin mode - see if it helps
amochin Nov 6, 2023
c4de2e3
Set export LD_LIBRARY_PATH to fix loading oracle instant client on l…
amochin Nov 6, 2023
f62140c
Can't test wrong oracle client path without windows
amochin Nov 6, 2023
10fe9e2
Merge pull request #192 from MarketSquare/add_typing
amochin Nov 6, 2023
1d98fd5
Try moving setting PATH var directly in front of robot launch
amochin Nov 6, 2023
98d0ffc
[DEBUG] messing up lines in shell script in CI
amochin Nov 6, 2023
8c7dbef
Revert "[DEBUG] messing up lines in shell script in CI"
amochin Nov 6, 2023
587aad4
Revert "Try moving setting PATH var directly in front of robot launch"
amochin Nov 6, 2023
bd744e9
Trying to fix the env var..
amochin Nov 6, 2023
4f1c10d
Try ldconfig..
amochin Nov 6, 2023
6955377
Try adding the libaio...
amochin Nov 6, 2023
924889c
Remove oracle thick mode pipeline as they don't work anyway - local t…
amochin Nov 6, 2023
593b8dd
Docs about oracledb client mode
amochin Nov 6, 2023
4fe39e1
Merge branch 'master' into oracle-mode-switch
amochin Nov 6, 2023
9c99cd6
Merge pull request #193 from MarketSquare/oracle-mode-switch
amochin Nov 6, 2023
edbede8
Add alias with backward compability
nczita Oct 21, 2021
69dc9b1
Add tests for aliased connections
bhirsz Nov 7, 2023
69c3143
Redesign connection cache to clear connection after disconnect
bhirsz Nov 8, 2023
d619a92
Update documentation with aliases and improved display
bhirsz Nov 9, 2023
32722b1
Update connection setup & teardown in tests
bhirsz Nov 9, 2023
c4f2a72
Move connection to ConnectionStore class
bhirsz Nov 10, 2023
e353506
Improve keywords docs in assertions
amochin Nov 18, 2023
82d27bf
Improve docs for new keyword "disconnect from all databases"
amochin Nov 18, 2023
3cfbd5e
Improve docs for new keyword "switch database"
amochin Nov 18, 2023
7379742
Improve naming and location of keywords for aliased connection tests
amochin Nov 18, 2023
89c9582
Merge two global "connect to db" keywords in tests
amochin Nov 18, 2023
d3adab0
Aliases tests don't work for SQLite as each connection is always a ne…
amochin Nov 18, 2023
abca110
Test for real multiple connections
amochin Nov 18, 2023
5f50920
Add example with aliases into readme
amochin Nov 18, 2023
3721d08
Bump version to 1.4 - slowly getting ready for release
amochin Nov 18, 2023
f368032
Merge pull request #196 from MarketSquare/aliased_connection
amochin Nov 18, 2023
7df2cca
Fix and improve error handling for missing or invalid configuration file
bhirsz Nov 10, 2023
8240bdb
Update query.py
carnegiemedal Aug 11, 2023
a8cbb94
Update query.py
carnegiemedal Aug 11, 2023
7d03323
Update basic_tests.robot
carnegiemedal Aug 11, 2023
7095c08
Update basic_tests.robot
carnegiemedal Aug 11, 2023
b883582
Update basic_tests.robot
carnegiemedal Aug 14, 2023
1174c7e
Update basic_tests.robot
carnegiemedal Aug 14, 2023
03c5f5d
Update documentation with parameters examples
bhirsz Nov 19, 2023
d562452
Merge pull request #197 from MarketSquare/fix/config_file_without_sec…
amochin Nov 20, 2023
1a9987d
Update query.py
carnegiemedal Aug 11, 2023
402664c
Update query.py
carnegiemedal Aug 11, 2023
3f94ad4
Update basic_tests.robot
carnegiemedal Aug 11, 2023
16a281e
Update basic_tests.robot
carnegiemedal Aug 11, 2023
5f2c022
Update basic_tests.robot
carnegiemedal Aug 14, 2023
6ce795c
Update basic_tests.robot
carnegiemedal Aug 14, 2023
8902334
Update documentation with parameters examples
bhirsz Nov 19, 2023
2981b16
Add missing parameters arg to assertions keywords
bhirsz Nov 20, 2023
79560d7
Extend tests for queries with params and move them into a separe test…
amochin Nov 20, 2023
e929dc0
Merge branch 'feature/execute_parameters' of https://github.com/Marke…
amochin Nov 20, 2023
170050b
Merge pull request #198 from MarketSquare/feature/execute_parameters
amochin Nov 20, 2023
8a35c1c
Bump version to 1.4.1
amochin Nov 20, 2023
a212ff0
Forgot new query params in some keyword docs
amochin Nov 20, 2023
5ba7485
Update main docs in the lib source code
amochin Nov 20, 2023
7b0ddde
Update keyword docs
amochin Nov 20, 2023
421dffe
Merge pull request #200 from MarketSquare/fix-docs
amochin Nov 20, 2023
336e1ca
Fix #202 - no empty list if no sql params
amochin Dec 8, 2023
03f39f9
Merge pull request #203 from MarketSquare/fix-202
amochin Dec 12, 2023
718891f
Tests for PL/SQL block with IF condition inside - Oracle and MSSQL
amochin Dec 18, 2023
a762ab4
Fix docker run strings
amochin Dec 18, 2023
dc5a2e1
Improve statemnt blocks recognition using regexp
amochin Dec 18, 2023
0999fef
Add scripts for create procedure tests for other databases
amochin Dec 18, 2023
352962d
Consistent file names
amochin Dec 18, 2023
038d9f6
Allow disabling the statement splitting when running an SQL script file
amochin Dec 19, 2023
8292df2
Parameter 'omitTrailingSemicolon' for explicit instruction, if the tr…
amochin Dec 19, 2023
6780772
Merge pull request #206 from MarketSquare/parse-script-improvements
amochin Dec 19, 2023
96db359
Update docs of the 'query' keyword - fix #201
amochin Dec 19, 2023
29197dd
v1.4.2
amochin Dec 19, 2023
deb1db2
Merge pull request #207 from MarketSquare/improve-query-docs
amochin Dec 19, 2023
f8ee5c1
Update keyword docs
amochin Dec 19, 2023
17a70a9
Move new params to the end to avoid backwards incompatibility
amochin Dec 19, 2023
e31f690
Add .DS_Store to ignore
amochin Feb 27, 2024
4a63bd7
Add test with multiple query params
amochin Feb 28, 2024
a69ace4
Handle query params as tuples, not as lists - fix #211
amochin Feb 28, 2024
11adf00
Typo
amochin Feb 28, 2024
fc76ca4
Add "precommit" into requirements
amochin Feb 28, 2024
d6c36d7
Bump version to 1.4.4
amochin Feb 28, 2024
e6b25fc
Fix stored procedures script for MSSQL
amochin Feb 28, 2024
585638e
Add build into requirements
amochin Feb 28, 2024
c6170a3
Add twine into requirements
amochin Feb 28, 2024
26b49ef
Merge pull request #212 from MarketSquare/multi-params
amochin Feb 28, 2024
9514f07
Link to the Robocon 2024 video
amochin Jun 11, 2024
b916815
Update link to Robocon video
amochin Jul 19, 2024
b52eb0a
New keywords with assertion engine and require min. Python 3.8 and RF…
amochin Aug 12, 2024
27d6bfb
Bump version to 1.5.0
amochin Aug 12, 2024
d1f5b40
Retry mechanism for assertion keywords 'Check Row Count' and 'Check Q…
amochin Aug 13, 2024
261c32a
Log query result as a table (#217)
amochin Aug 14, 2024
b65afdf
Enable setup of logging query results during library import and using…
amochin Aug 14, 2024
60ba7af
Bump version to 2.0 - make a major release because of some bigger cha…
amochin Aug 15, 2024
e4fbe12
Remove redundant logging and improve log formatting for readability
amochin Aug 15, 2024
bd6df4e
Calling a stored procedure in MSSQL - special handling of OUT params …
amochin Aug 16, 2024
bb06725
Merge pull request #219 from MarketSquare/proc-mssql
amochin Aug 16, 2024
2171d9f
Docs fix
amochin Aug 25, 2024
c044109
Allow custom params for keyword "Connect To Database" (#220)
amochin Sep 27, 2024
611b1d0
Refactor parameter names and clean up docs (#221)
amochin Sep 27, 2024
82da587
Connect to "ibm_db" - fix "user" and "password" params, which must be…
amochin Sep 30, 2024
60debcd
Fix docs - connection to ibmdb via connection string
amochin Oct 1, 2024
d4ba70a
Merge PR #222 from dev (V2.0 Release)
amochin Oct 1, 2024
26365e1
ibm_db - set driver path to DLL libs (fix #223)
amochin Oct 1, 2024
78a381b
Bump version to 2.0.1
amochin Oct 1, 2024
a22d205
variable instead of hardcoded ibm_db value
amochin Oct 1, 2024
dc2c298
Fix version visibility in keyword documentation (#226)
eeter Oct 9, 2024
1182dd0
V. 2.0.3 - update version and keyword docs
amochin Oct 9, 2024
4cde94d
Fix path length issue with ibmdb on Windows (#228)
amochin Oct 11, 2024
6021ed3
v2.0.4 - update version and docs
amochin Oct 11, 2024
7b232e5
Fix: Update connection_manager.py
herrek1 Dec 12, 2024
eb6767a
Connection examples for different DB modules - fix #229
amochin Jan 28, 2025
2acc05d
JDBC connection tests
amochin Jan 28, 2025
74d96f0
SQLite tests - use new connection keyword instead of deprecated one
amochin Jan 28, 2025
3dfc10e
Merge pull request #230 from herrek1/patch-1
amochin Jan 28, 2025
e49bfb5
Bump version to 2.0.5
amochin Jan 28, 2025
4ed0a83
Merge remote 'dev' into local one
amochin Jan 28, 2025
85e1a6a
Fix tests - error message from Oracle might be slightly different
amochin Jan 28, 2025
3c6b388
Fix tests with ODBC MySQL driver
amochin Feb 2, 2025
fc131d3
Import parameter 'warn_on_connection_overwrite'
amochin Feb 2, 2025
ed40103
Default value for Import parameter 'warn_on_connection_overwrite'
amochin Feb 3, 2025
025ac22
Use len() to determine row count when using JayDeBeApi (#154)
jellemdekker Feb 3, 2025
6f92ad9
Rollback in case of errors only
amochin Feb 3, 2025
012ae63
Support set autocmmit for jaydebeapi
amochin Feb 3, 2025
7b8a3bc
Add tests for Jaydebeapi
amochin Feb 4, 2025
c4e1872
Allow different 'omit trailing semicolon' behavior pro connection
amochin Feb 4, 2025
9a8389b
New keyword 'Set Omit Trailing Semicolon'
amochin Feb 4, 2025
19012b9
omit_trailing_semicolon - better argument naming
amochin Feb 4, 2025
527b94a
Update the docs
amochin Feb 4, 2025
b42452d
Docs on ibm_db incompatibility - use ibm_db_dbi
amochin Feb 4, 2025
12d7d6d
Throw an error when trying to set autocommit for ibm_db as it's not s…
amochin Feb 4, 2025
2e49f9f
Bump version to 2.1.0
amochin Feb 4, 2025
de11778
Set "omit trailing semicolon" in tests for oracle via jaydebeapi
amochin Feb 4, 2025
594caff
docs - extend examples for JDBC
amochin Feb 4, 2025
a35e21b
Merge pull request #234 from MarketSquare/dev
amochin Feb 4, 2025
485c7a1
[CI] Update pages upload workflow to 3
amochin Feb 4, 2025
888b529
[CI] Update pages deploy workflow to 4
amochin Feb 4, 2025
516fb35
Support SAP HANA via ODBC - user "SERVERNODE" parameter in connection…
amochin Feb 10, 2025
f38e077
Bump version to 2.1.1
amochin Feb 10, 2025
714f1ed
Test "For Loop"
amochin Feb 15, 2025
b077395
Remove Excellib dependency as it's not needed for library usage (requ…
amochin Feb 15, 2025
ff1645d
Support RF dotted dictionary access syntax when returning query resul…
amochin Feb 15, 2025
619285a
Better colors in logging query results when using dark mode (#238)
amochin Feb 15, 2025
1bfaec6
Bump version to 2.1.2
amochin Feb 15, 2025
02dbb61
Delete old tests
amochin Feb 15, 2025
e324bf6
Put some more info in test readme
amochin Feb 15, 2025
9cbed65
Delete old readme about pipeline tests
amochin Feb 17, 2025
da5e893
Merge branch 'master' into fix-237
amochin Feb 18, 2025
e403ef4
Fix #237 - commit even after simple query
amochin Feb 20, 2025
2b9b7c0
Bump version to 2.1.3
amochin Feb 20, 2025
ba5a801
2.1.3 - update docs
amochin Feb 20, 2025
9aa14a4
Fix pymysql tests
amochin Feb 20, 2025
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
177 changes: 177 additions & 0 deletions .github/workflows/common_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: Common DB Tests

on: [push, pull_request]

env:
DB_NAME: db
DB_USER: db_user
DB_PASS: pass
DB_HOST: 127.0.0.1
# port is set in the job

# options for pyodbc only
DB_CHARSET: utf8mb4
DB_DRIVER: "{MySQL ODBC 9.2 ANSI Driver}"

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- job_name: PostgreSQL
module_mode: standard
py_db_module: psycopg2
pip_install: psycopg2
db_port: 5432
- job_name: oracledb
module_mode: standard
py_db_module: oracledb
pip_install: oracledb
db_port: 1521
- job_name: SQLite
module_mode: custom
py_db_module: sqlite3
pip_install: none
db_port: 0000
- job_name: MySQL_pymysql
module_mode: standard
py_db_module: pymysql
pip_install: pymysql[rsa]
db_port: 3306
- job_name: MySQL_pyodbc
module_mode: standard
py_db_module: pyodbc
pip_install: pyodbc
db_port: 3306

services:
postgres:
image: postgres:11
env:
POSTGRES_DB: ${{ env.DB_NAME }}
POSTGRES_USER: ${{ env.DB_USER }}
POSTGRES_PASSWORD: ${{ env.DB_PASS }}
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

oracle:
image: gvenzl/oracle-free:latest
env:
ORACLE_PASSWORD: ${{ env.DB_PASS }}
ORACLE_DATABASE: ${{ env.DB_NAME }}
APP_USER: ${{ env.DB_USER }}
APP_USER_PASSWORD: ${{ env.DB_PASS }}
ports:
- 1521:1521
# Provide healthcheck script options for startup
options: --health-cmd healthcheck.sh --health-interval 10s --health-timeout 5s --health-retries 10

mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: ${{ env.DB_PASS }}
MYSQL_DATABASE: ${{ env.DB_NAME }}
MYSQL_USER: ${{ env.DB_USER }}
MYSQL_PASSWORD: ${{ env.DB_PASS }}
ports:
- 3306:3306

steps:

- name: Install unixodbc
if: matrix.py_db_module == 'pyodbc'
run: sudo apt-get update && sudo apt-get install -y unixodbc

- name: Install ODBC driver for PostgreSQL
if: matrix.py_db_module == 'pyodbc'
run: |
echo "*** apt-get install the driver"
sudo apt-get install --yes odbc-postgresql
echo '*** ls -l /usr/lib/x86_64-linux-gnu/odbc'
ls -l /usr/lib/x86_64-linux-gnu/odbc || true
echo '*** add full paths to Postgres .so files in /etc/odbcinst.ini'
sudo sed -i 's|Driver=psqlodbca.so|Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so|g' /etc/odbcinst.ini
sudo sed -i 's|Driver=psqlodbcw.so|Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so|g' /etc/odbcinst.ini
sudo sed -i 's|Setup=libodbcpsqlS.so|Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so|g' /etc/odbcinst.ini

- name: Install ODBC driver for MySQL
if: matrix.py_db_module == 'pyodbc'
run: |
cd "$RUNNER_TEMP"
echo "*** download driver"
curl --silent --show-error --write-out "$CURL_OUTPUT_FORMAT" -O -L "https://dev.mysql.com/get/Downloads/Connector-ODBC/9.2/${MYSQL_DRIVER}"
ls -l "${MYSQL_DRIVER}"
echo "*** install the driver"
sudo dpkg -i "./${MYSQL_DRIVER}"
sudo apt-get install -f
env:
CURL_OUTPUT_FORMAT: '%{http_code} %{filename_effective} %{size_download} %{time_total}\n'
MYSQL_DRIVER: mysql-connector-odbc_9.2.0-1ubuntu24.04_amd64.deb

- name: Check ODBC setup
if: matrix.py_db_module == 'pyodbc'
run: |
echo "*** odbcinst -j"
odbcinst -j
echo "*** cat /etc/odbcinst.ini"
cat /etc/odbcinst.ini
echo "*** cat /etc/odbc.ini"
cat /etc/odbc.ini
echo '*** ls -l /opt/microsoft/msodbcsql17/lib64'
ls -l /opt/microsoft/msodbcsql17/lib64 || true
echo '*** ls -l /usr/lib/x86_64-linux-gnu/odbc'
ls -l /usr/lib/x86_64-linux-gnu/odbc || true

- name: Check out repository code
uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.8.14'

- name: Setup Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Install Development/Checked out version of DatabaseLibrary
run: |
pip install -e ${{ github.workspace }}

- name: Setup Python DB module
if: matrix.pip_install != 'none'

run: |
pip install ${{ matrix.pip_install }}

- name: Tests for ${{ matrix.job_name }}
working-directory: ./test
run: >-
robot
-d results
--xunit result.xml
--loglevel DEBUG:INFO
--output output_${{ matrix.job_name }}.xml
--log log_${{ matrix.job_name }}.html
--report report_${{ matrix.job_name }}.html
-v DB_MODULE_MODE:${{ matrix.module_mode }}
-v DB_MODULE:${{ matrix.py_db_module }}
-v DB_NAME:${{ env.DB_NAME }}
-v DB_USER:${{ env.DB_USER }}
-v DB_PASS:${{ env.DB_PASS }}
-v DB_HOST:${{ env.DB_HOST }}
-v DB_PORT:${{ matrix.db_port }}
-v DB_CHARSET:${{env.DB_CHARSET}}
-v DB_DRIVER:"${{env.DB_DRIVER}}"
tests/common_tests

- name: Upload Robot Logs
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: log-files-${{ matrix.job_name }}
path: ./test/results/
43 changes: 43 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'doc'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
56 changes: 56 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
# This workflow will install Python dependencies
# and run unit tests for given OSes

name: Unit tests

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: 'ubuntu-latest'
python-version: '3.8'
rf-version: '5.0.1'
- os: 'ubuntu-latest'
python-version: '3.9'
rf-version: '5.0.1'
- os: 'ubuntu-latest'
python-version: '3.10'
rf-version: '6.1.1'
- os: 'ubuntu-latest'
python-version: '3.11'
rf-version: '6.1.1'
- os: 'ubuntu-latest'
python-version: '3.12'
rf-version: '7.0.1'
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install robotframework==${{ matrix.rf-version }} coverage pytest
pip install .

- name: Run unit tests with coverage
run:
coverage run -m pytest

- name: Codecov
uses: codecov/codecov-action@v3
with:
name: ${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.rf-version }}
18 changes: 12 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
dist/
build/
*.egg-info/
*.pyc
.idea
.py*/
*.egg-info/
test/log.html
test/my_db_test.db
test/output.xml
test/report.html
test/logs/
**/my_db_test.db
logs
interactive_console_output.xml
log.html
output.xml
report.html
venv
.runNumber
.DS_Store
test/resources/ojdbc17.jar
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)

- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
17 changes: 0 additions & 17 deletions .project

This file was deleted.

10 changes: 0 additions & 10 deletions .pydevproject

This file was deleted.

28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.pylint",
"robocorp.robotframework-lsp",
"techer.open-in-browser",
"eamodio.gitlens"
]
}
Loading