Skip to content

Merge pull request #101 from CamronBorealis/main #57

Merge pull request #101 from CamronBorealis/main

Merge pull request #101 from CamronBorealis/main #57

---
name: Integration tests on Azure SQL DB
on: # yamllint disable-line rule:truthy
push:
branches:
- main
- v*
pull_request_target:
types: [labeled]
jobs:
integration-tests-azure:
name: Integration tests on Azure SQL DB
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.ref_name == 'main' || startsWith(github.ref_name, 'v')
strategy:
matrix:
dbt_package:
["dbt_audit_helper", "dbt_date", "dbt_expectations", "dbt_utils"]
fail-fast: false
runs-on: ubuntu-latest
container:
image: ghcr.io/dbt-msft/dbt-sqlserver:CI-3.10-msodbc18
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: pip install -r dev_requirements.txt
- name: Copy profiles
run: |
mkdir -p ~/.dbt
cp devops/ci/profiles.yml ~/.dbt/profiles.yml
- name: Wake up server
env:
DBT_AZURESQL_SERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
DBT_AZURESQL_DB: ${{ secrets.DBT_AZURESQL_DB }}
DBT_AZURESQL_UID: ${{ secrets.DBT_AZURESQL_UID }}
DBT_AZURESQL_PWD: ${{ secrets.DBT_AZURESQL_PWD }}
MSODBC_VERSION: 18
run: python devops/wakeup_azure.py
- name: Run integration tests
run: |
dbt deps --target azuresql
dbt seed --target azuresql --full-refresh
dbt run --target azuresql --full-refresh
dbt test --target azuresql
working-directory: integration_tests/${{ matrix.dbt_package }}
env:
DBT_AZURESQL_SERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
DBT_AZURESQL_DB: ${{ secrets.DBT_AZURESQL_DB }}
AZURE_CLIENT_ID: ${{ secrets.DBT_AZURE_SP_NAME }}
AZURE_CLIENT_SECRET: ${{ secrets.DBT_AZURE_SP_SECRET }}
AZURE_TENANT_ID: ${{ secrets.DBT_AZURE_TENANT }}