File tree Expand file tree Collapse file tree 2 files changed +19
-17
lines changed
Expand file tree Collapse file tree 2 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 11name : Test all warehouse platforms
22on :
3- pull_request_target :
3+ pull_request :
44 branches : ["master"]
55 # Allows you to run this workflow manually from the Actions tab
66 workflow_dispatch :
4141 fromJSON('["latest_official"]') }}
4242 warehouse-type :
4343 [
44- postgres,
45- snowflake,
46- bigquery,
47- redshift,
48- databricks_catalog,
49- athena,
50- trino,
51- clickhouse,
52- dremio,
44+ postgres
5345 ]
54- include :
55- # If we're not running on a specific dbt version, then always add postgres on 1.8.0
56- - dbt-version : " ${{ inputs.dbt-version || '1.8.0' }}"
57- warehouse-type : postgres
58- - dbt-version : " ${{ inputs.dbt-version || 'latest_pre' }}"
59- warehouse-type : postgres
6046 uses : ./.github/workflows/test-warehouse.yml
6147 with :
6248 warehouse-type : ${{ matrix.warehouse-type }}
Original file line number Diff line number Diff line change 5353 TESTS_DIR : ${{ github.workspace }}/dbt-data-reliability/integration_tests
5454
5555jobs :
56+ detect-fork :
57+ runs-on : ubuntu-latest
58+ outputs :
59+ requires_approval : ${{ steps.set-output.outputs.requires_approval }}
60+ steps :
61+ - name : Set fork output
62+ id : set-output
63+ run : |
64+ if [[ "${{ github.event_name }}" == "pull_request_target" && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
65+ echo "requires_approval=true" >> $GITHUB_OUTPUT
66+ else
67+ echo "requires_approval=false" >> $GITHUB_OUTPUT
68+ fi
69+
5670 test :
5771 runs-on : ubuntu-latest
58- environment : elementary_test_env # This is a github environment (not to be confused with env vars)
72+ needs : [detect-fork]
73+ # PRs from forks require approval - so we use an environment that requires an approver from the team.
74+ environment : ${{ (needs.detect-fork.outputs.requires_approval == 'true' && 'elementary_test_env') || '' }}
5975 concurrency :
6076 # This is what eventually defines the schema name in the data platform.
6177 group : tests_${{ inputs.warehouse-type }}_dbt_${{ inputs.dbt-version }}_${{ github.head_ref || github.ref_name }}
You can’t perform that action at this time.
0 commit comments