Skip to content

Commit

Permalink
fix msodbcsql installation (#171)
Browse files Browse the repository at this point in the history
## Description
mysodbsql17 can no longer be found when building ubuntu, upgrading to
version 18 so we can continue building.
  • Loading branch information
ericbuckley authored Jan 15, 2025
1 parent 43bcec8 commit 68503f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
# Update package lists
sudo apt-get update
# Accept the EULA and install msodbcsql17
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev
# Accept the EULA and install msodbcsql18
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 unixodbc-dev
- name: Run Pytest with the matrix database
run: |
Expand All @@ -76,7 +76,7 @@ jobs:
elif [[ "${{ matrix.database }}" == "mysql" ]]; then
export TEST_DB_URI=mysql+pymysql://root:pw@localhost:3306/mysql
elif [[ "${{ matrix.database }}" == "sqlserver" ]]; then
export TEST_DB_URI=mssql+pyodbc://sa:YourStrong!Passw0rd@localhost:1433/master?driver=ODBC+Driver+17+for+SQL+Server
export TEST_DB_URI=mssql+pyodbc://sa:YourStrong!Passw0rd@localhost:1433/master?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes
fi
pytest --cov=recordlinker tests/unit
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN if [ "$USE_MSSQL" = "true" && "$(dpkg --print-architecture)" = "amd64" ]; th
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/microsoft.gpg && \
curl https://packages.microsoft.com/config/debian/11/prod.list | tee /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev; \
ACCEPT_EULA=Y apt-get install -y msodbcsql18 unixodbc-dev; \
fi

WORKDIR /code
Expand Down
2 changes: 1 addition & 1 deletion docs/site/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ drivers are installed allowing for connections to:

- **[pyodbc](https://github.com/mkleehammer/pyodbc/wiki) (sqlite)**

Example: `mssql+pyodbc://user:password@localhost/dbname?driver=ODBC+Driver+17+for+SQL+Server`
Example: `mssql+pyodbc://user:password@localhost/dbname?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes`


## Docker Configuration
Expand Down

0 comments on commit 68503f4

Please sign in to comment.