File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 11name : Test all warehouse platforms
22on :
3- pull_request :
3+ pull_request_target :
44 branches : ["master"]
55 # Allows you to run this workflow manually from the Actions tab
66 workflow_dispatch :
6666 warehouse-type : ${{ matrix.warehouse-type }}
6767 dbt-version : ${{ matrix.dbt-version }}
6868 elementary-ref : ${{ inputs.elementary-ref }}
69- dbt-data-reliability-ref : ${{ inputs.dbt-data-reliability-ref }}
69+ dbt-data-reliability-ref : ${{ inputs.dbt-data-reliability-ref != '' && inputs.dbt-data-reliability-ref || (github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '') }}
7070 secrets : inherit
7171
7272 notify_failures :
Original file line number Diff line number Diff line change 5151 TESTS_DIR : ${{ github.workspace }}/dbt-data-reliability/integration_tests
5252
5353jobs :
54- approve :
55- runs-on : ubuntu-latest
56- steps :
57- - name : Approval notice
58- run : |
59- echo "Your PR needs to be approved to run on the dwh_tests environment before this workflow can continue"
60-
6154 test :
6255 runs-on : ubuntu-latest
63- needs : approve
6456 environment : dwh_tests # This is a github environment (not to be confused with env vars)
6557 concurrency :
6658 # This is what eventually defines the schema name in the data platform.
@@ -123,7 +115,6 @@ jobs:
123115 env :
124116 PROFILES_YML : ${{ secrets.CI_PROFILES_YML }}
125117 run : |
126- echo "Setting profiles.yml"
127118 mkdir -p ~/.dbt
128119 DBT_VERSION=$(pip show dbt-core | grep -i version | awk '{print $2}' | sed 's/\.//g')
129120 UNDERSCORED_REF_NAME=$(echo "${{ inputs.warehouse-type }}_dbt_${DBT_VERSION}_${BRANCH_NAME}" | awk '{print tolower($0)}' | head -c 40 | sed "s/-/_/g")
You can’t perform that action at this time.
0 commit comments