|
| 1 | +# **what?** |
| 2 | +# Run tests using dbt Fusion against Snowflake |
| 3 | + |
| 4 | +# **why?** |
| 5 | +# To ensure that dbt-project-evaluator works as expected with dbt Fusion |
| 6 | +# This runs alongside (not replacing) the existing dbt-core tests |
| 7 | + |
| 8 | +# **when?** |
| 9 | +# On every PR, and every push to main and when manually triggered |
| 10 | + |
| 11 | +# **note** |
| 12 | +# Currently only Snowflake is tested with Fusion. Additional adapters can be |
| 13 | +# added to the matrix as Fusion support expands. Credentials are shared with |
| 14 | +# the existing dbt-core Snowflake tests. |
| 15 | + |
| 16 | +name: Fusion Integration Tests |
| 17 | + |
| 18 | +on: |
| 19 | + push: |
| 20 | + branches: |
| 21 | + - main |
| 22 | + pull_request: |
| 23 | + workflow_dispatch: |
| 24 | + |
| 25 | +env: |
| 26 | + PYTHON_VERSION: "3.11" |
| 27 | + |
| 28 | +jobs: |
| 29 | + run-tests: |
| 30 | + runs-on: ubuntu-latest |
| 31 | + strategy: |
| 32 | + fail-fast: false |
| 33 | + matrix: |
| 34 | + # Only Snowflake for now - add more adapters here as Fusion support expands |
| 35 | + adapter: [snowflake] |
| 36 | + |
| 37 | + steps: |
| 38 | + - name: "Checkout ${{ github.event.repository }}" |
| 39 | + uses: actions/checkout@v4 |
| 40 | + |
| 41 | + - name: "Set up Python ${{ env.PYTHON_VERSION }}" |
| 42 | + uses: actions/setup-python@v5 |
| 43 | + with: |
| 44 | + python-version: ${{ env.PYTHON_VERSION }} |
| 45 | + |
| 46 | + - name: "Install dbt Fusion" |
| 47 | + run: | |
| 48 | + curl -fsSL https://public.cdn.getdbt.com/fs/install/install.sh | sh |
| 49 | + echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 50 | +
|
| 51 | + - name: "Verify Fusion installation" |
| 52 | + run: | |
| 53 | + dbt --version |
| 54 | +
|
| 55 | + - name: "Install tox" |
| 56 | + run: | |
| 57 | + python -m pip install --upgrade pip |
| 58 | + pip install tox |
| 59 | +
|
| 60 | + - name: "Run Fusion integration tests on ${{ matrix.adapter }}" |
| 61 | + run: | |
| 62 | + tox -e dbt_integration_fusion_${{ matrix.adapter }} |
| 63 | + env: |
| 64 | + # snowflake |
| 65 | + SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }} |
| 66 | + SNOWFLAKE_USER: ${{ vars.SNOWFLAKE_USER }} |
| 67 | + DBT_ENV_SECRET_SNOWFLAKE_PASS: ${{ secrets.SNOWFLAKE_PASS }} |
| 68 | + SNOWFLAKE_ROLE: ${{ vars.SNOWFLAKE_ROLE }} |
| 69 | + SNOWFLAKE_DATABASE: ${{ vars.SNOWFLAKE_DATABASE }} |
| 70 | + SNOWFLAKE_WAREHOUSE: ${{ vars.SNOWFLAKE_WAREHOUSE }} |
| 71 | + SNOWFLAKE_SCHEMA: "fusion_integration_tests_${{ matrix.adapter }}_${{ github.run_number }}" |
0 commit comments