Skip to content

Commit 91bd00f

Browse files
committed
Add logic to use environments
1 parent 53a488b commit 91bd00f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/test-warehouse.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,17 @@ env:
5151
TESTS_DIR: ${{ github.workspace }}/dbt-data-reliability/integration_tests
5252

5353
jobs:
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+
5461
test:
5562
runs-on: ubuntu-latest
63+
needs: approve
64+
environment: dwh_tests # This is a github environment (not to be confused with env vars)
5665
concurrency:
5766
# This is what eventually defines the schema name in the data platform.
5867
group: tests_${{ inputs.warehouse-type }}_dbt_${{ inputs.dbt-version }}_${{ github.head_ref || github.ref_name }}
@@ -114,6 +123,7 @@ jobs:
114123
env:
115124
PROFILES_YML: ${{ secrets.CI_PROFILES_YML }}
116125
run: |
126+
echo "Setting profiles.yml"
117127
mkdir -p ~/.dbt
118128
DBT_VERSION=$(pip show dbt-core | grep -i version | awk '{print $2}' | sed 's/\.//g')
119129
UNDERSCORED_REF_NAME=$(echo "${{ inputs.warehouse-type }}_dbt_${DBT_VERSION}_${BRANCH_NAME}" | awk '{print tolower($0)}' | head -c 40 | sed "s/-/_/g")

0 commit comments

Comments
 (0)