Skip to content

Integration tests on SQL Server #745

Integration tests on SQL Server

Integration tests on SQL Server #745

---
name: Integration tests on SQL Server
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches:
- master
- v*
pull_request:
branches:
- master
- v*
schedule:
- cron: '0 22 * * 0'
jobs:
integration-tests-sql-server:
name: Regular
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
msodbc_version: ["17", "18"]
sqlserver_version: ["2017", "2019", "2022"]
collation: ["SQL_Latin1_General_CP1_CS_AS", "SQL_Latin1_General_CP1_CI_AS"]
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}:CI-${{ matrix.python_version }}-msodbc${{ matrix.msodbc_version }}
services:
sqlserver:
image: ghcr.io/${{ github.repository }}:server-${{ matrix.sqlserver_version }}
env:
ACCEPT_EULA: 'Y'
SA_PASSWORD: 5atyaNadella
DBT_TEST_USER_1: DBT_TEST_USER_1
DBT_TEST_USER_2: DBT_TEST_USER_2
DBT_TEST_USER_3: DBT_TEST_USER_3
COLLATION: ${{ matrix.collation }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: pip install -r dev_requirements.txt
- name: Run functional tests
run: pytest -ra -v tests/functional --profile "ci_sql_server"
env:
DBT_TEST_USER_1: DBT_TEST_USER_1
DBT_TEST_USER_2: DBT_TEST_USER_2
DBT_TEST_USER_3: DBT_TEST_USER_3
SQLSERVER_TEST_DRIVER: 'ODBC Driver ${{ matrix.msodbc_version }} for SQL Server'