Skip to content

Merge pull request #90 from BastiaanRudolf/fix-cross-database-macros #53

Merge pull request #90 from BastiaanRudolf/fix-cross-database-macros

Merge pull request #90 from BastiaanRudolf/fix-cross-database-macros #53

---
name: Integration tests on Azure Synapse Dedicated SQL
on: # yamllint disable-line rule:truthy
push:
branches:
- main
- v*
pull_request_target:
types: [labeled]
jobs:
integration-tests-azure:
name: Integration tests on Azure Synapse Dedicated SQL
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: Resume server
env:
DBT_SYNAPSE_SERVER: ${{ secrets.DBT_SYNAPSE_SERVER }}
DBT_SYNAPSE_DB: ${{ secrets.DBT_SYNAPSE_DB }}
AZURE_CLIENT_ID: ${{ secrets.DBT_AZURE_SP_NAME }}
AZURE_CLIENT_SECRET: ${{ secrets.DBT_AZURE_SP_SECRET }}
AZURE_TENANT_ID: ${{ secrets.DBT_AZURE_TENANT }}
DBT_AZURE_RESOURCE_GROUP_NAME: ${{ secrets.DBT_AZURE_RESOURCE_GROUP_NAME }}
DBT_AZURE_SUBSCRIPTION_ID: ${{ secrets.DBT_AZURE_SUBSCRIPTION_ID }}
run: python devops/synapse.py resume
- name: Run integration tests
run: |
dbt deps --target synapse
dbt seed --target synapse --full-refresh
dbt run --target synapse --full-refresh
dbt test --target synapse
working-directory: integration_tests/${{ matrix.dbt_package }}
env:
DBT_SYNAPSE_SERVER: ${{ secrets.DBT_SYNAPSE_SERVER }}
DBT_SYNAPSE_DB: ${{ secrets.DBT_SYNAPSE_DB }}
AZURE_CLIENT_ID: ${{ secrets.DBT_AZURE_SP_NAME }}
AZURE_CLIENT_SECRET: ${{ secrets.DBT_AZURE_SP_SECRET }}
AZURE_TENANT_ID: ${{ secrets.DBT_AZURE_TENANT }}