Skip to content

Commit

Permalink
Add .travis.yml for running tests using MS SQL docker image
Browse files Browse the repository at this point in the history
Reference for installing `pyodbc` dependencies.

 - https://github.com/mkleehammer/pyodbc/wiki/Install
 - mkleehammer/pyodbc#685

Connection to MSSQL docker is made with FreeTDS driver.
The following bug explains the manual configuration.

https://bugs.launchpad.net/ubuntu/+source/freetds/+bug/1173083
  • Loading branch information
abitrolly committed Feb 17, 2020
1 parent 189fab3 commit 83a1382
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: python

dist: bionic

install:
# MSSQL support, 4 lines
# until https://github.com/epam/OSCI/issues/2 is fixed
- docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -e 'MSSQL_PID=Express' -p 127.0.0.1:1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest-ubuntu
- sudo apt-get -y install unixodbc-dev tdsodbc
- sudo odbcinst -i -d -f /usr/share/tdsodbc/odbcinst.ini

- pip install -r requirements.txt

script:
# test connection
- python dbconnector.py

0 comments on commit 83a1382

Please sign in to comment.