ci: use reusable workflows from dbt-labs/dbt-package-testing@v2 #105
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # **what?** | |
| # Run tests for dbt-project-evaluator against supported adapters | |
| # **why?** | |
| # To ensure that dbt-project-evaluator works as expected with all supported adapters | |
| # **when?** | |
| # On every PR, and every push to main and when manually triggered | |
| name: Package Integration Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request_target: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| core-tests: | |
| uses: dbt-labs/dbt-package-testing/.github/workflows/run_tox.yml@v2 | |
| with: | |
| # Adapters are read from supported_adapters.env if not specified here | |
| adapters: "snowflake,bigquery,redshift,databricks" | |
| # For pull_request_target: require environment approval for fork PRs | |
| environment: >- | |
| ${{ github.event_name == 'pull_request_target' | |
| && github.event.pull_request.head.repo.full_name != github.repository | |
| && 'cloud-tests' || '' }} | |
| # For pull_request_target: checkout the PR head, not the base branch | |
| ref: ${{ github.event.pull_request.head.sha || '' }} | |
| # snowflake | |
| SNOWFLAKE_USER: ${{ vars.SNOWFLAKE_USER }} | |
| SNOWFLAKE_ROLE: ${{ vars.SNOWFLAKE_ROLE }} | |
| SNOWFLAKE_DATABASE: ${{ vars.SNOWFLAKE_DATABASE }} | |
| SNOWFLAKE_WAREHOUSE: ${{ vars.SNOWFLAKE_WAREHOUSE }} | |
| SNOWFLAKE_SCHEMA: "dbt_project_evaluator_integration_tests_snowflake_${{ github.run_number }}" | |
| # bigquery | |
| BIGQUERY_PROJECT: ${{ vars.BIGQUERY_PROJECT }} | |
| BIGQUERY_SCHEMA: "dpe_integration_tests_bigquery_${{ github.run_number }}" | |
| # redshift | |
| REDSHIFT_HOST: ${{ vars.REDSHIFT_HOST }} | |
| REDSHIFT_USER: ${{ vars.REDSHIFT_USER }} | |
| REDSHIFT_DATABASE: ${{ vars.REDSHIFT_DATABASE }} | |
| REDSHIFT_SCHEMA: "dpe_integration_tests_redshift_${{ github.run_number }}" | |
| REDSHIFT_PORT: "5439" | |
| # databricks | |
| DATABRICKS_SCHEMA: "integration_tests_databricks_${{ github.run_number }}" | |
| DATABRICKS_HOST: ${{ vars.DATABRICKS_HOST }} | |
| DATABRICKS_HTTP_PATH: ${{ vars.DATABRICKS_HTTP_PATH }} | |
| secrets: | |
| SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }} | |
| DBT_ENV_SECRET_SNOWFLAKE_PASS: ${{ secrets.SNOWFLAKE_PASS }} | |
| BIGQUERY_KEYFILE_JSON: ${{ secrets.BIGQUERY_KEYFILE_JSON }} | |
| DBT_ENV_SECRET_REDSHIFT_PASS: ${{ secrets.REDSHIFT_PASS }} | |
| DBT_ENV_SECRET_DATABRICKS_TOKEN: ${{ secrets.DBT_ENV_SECRET_DATABRICKS_TOKEN }} |