Skip to content

Commit 13e81d5

Browse files
Merge branch 'master' into ele-5074-index-test_result_rows
2 parents 56d8f23 + cf75564 commit 13e81d5

2 files changed

Lines changed: 41 additions & 3 deletions

File tree

.github/workflows/test-warehouse.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,25 @@ env:
7575
ELMENTARY_INTERNAL_DBT_PKG_DIR: ${{ github.workspace }}/elementary/elementary/monitor/dbt_project
7676

7777
jobs:
78+
# PRs from forks require approval, specifically with the "pull_request_target" event as it contains repo secrets.
79+
check-if-requires-approval:
80+
runs-on: ubuntu-latest
81+
outputs:
82+
requires_approval: ${{ steps.set-output.outputs.requires_approval }}
83+
steps:
84+
- name: Set requires approval output
85+
id: set-output
86+
run: |
87+
if [[ "${{ github.event_name }}" =~ ^pull_request && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
88+
echo "requires_approval=true" >> $GITHUB_OUTPUT
89+
else
90+
echo "requires_approval=false" >> $GITHUB_OUTPUT
91+
fi
92+
7893
test:
7994
runs-on: ubuntu-latest
80-
environment: elementary_test_env # This is a github environment (not to be confused with env vars)
95+
needs: [check-if-requires-approval]
96+
environment: ${{ (needs.check-if-requires-approval.outputs.requires_approval == 'true' && 'elementary_test_env') || '' }}
8197
defaults:
8298
run:
8399
working-directory: elementary
@@ -188,10 +204,16 @@ jobs:
188204
--project-dir "${{ env.DBT_PKG_INTEG_TESTS_DIR }}"
189205
--project-profile-target "${{ inputs.warehouse-type }}"
190206
207+
- name: Set report artifact name
208+
id: set_report_artifact_name
209+
run: |
210+
ARTIFACT_NAME=$(echo "report_${{ inputs.warehouse-type }}_${BRANCH_NAME}_dbt_${{ inputs.dbt-version || '' }}.html" | awk '{print tolower($0)}' | sed 's#[":/\\<>|*?-]#_#g')
211+
echo "artifact_name=$ARTIFACT_NAME" >> "$GITHUB_OUTPUT"
212+
191213
- name: Upload report artifact
192214
uses: actions/upload-artifact@v4
193215
with:
194-
name: report_${{ inputs.warehouse-type }}_${{ env.BRANCH_NAME }}_dbt_${{ inputs.dbt-version }}.html
216+
name: ${{ steps.set_report_artifact_name.outputs.artifact_name }}
195217
path: elementary/edr_target/elementary_report.html
196218

197219
- name: Write GCS keyfile
@@ -223,11 +245,17 @@ jobs:
223245
--azure-container-name reports
224246
--update-bucket-website true
225247
248+
- name: Set artifact name
249+
id: set_artifact_name
250+
run: |
251+
ARTIFACT_NAME=$(echo "edr_${{ inputs.warehouse-type }}_${BRANCH_NAME}_dbt_${{ inputs.dbt-version || '' }}.log" | awk '{print tolower($0)}' | sed 's#[":/\\<>|*?-]#_#g')
252+
echo "artifact_name=$ARTIFACT_NAME" >> "$GITHUB_OUTPUT"
253+
226254
- name: Upload edr log
227255
if: ${{ always() }}
228256
uses: actions/upload-artifact@v4
229257
with:
230-
name: edr_${{ inputs.warehouse-type }}_${{ env.BRANCH_NAME }}_dbt_${{ inputs.dbt-version }}.log
258+
name: ${{ steps.set_artifact_name.outputs.artifact_name }}
231259
path: elementary/edr_target/edr.log
232260

233261
- name: Run Python package e2e tests

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ For additional information and help, you can use one of these channels:
101101
<a href="https://github.com/erikzaadi"><img src="https://avatars.githubusercontent.com/u/77775?v=4" width="50" height="50" alt=""/></a>
102102
<a href="https://github.com/dapollak"><img src="https://avatars.githubusercontent.com/u/13542197?v=4" width="50" height="50" alt=""/></a>
103103
<a href="https://github.com/Adamgo23"><img src="https://avatars.githubusercontent.com/u/125807478?v=4" width="50" height="50" alt=""/></a>
104+
<a href="https://github.com/MikaKerman"><img src="https://avatars.githubusercontent.com/u/24632225?v=4" width="50" height="50" alt=""/></a>
105+
<a href="https://github.com/GuyEshdat"><img src="https://avatars.githubusercontent.com/u/81393741?v=4" width="50" height="50" alt=""/></a>
106+
<a href="https://github.com/michael-myaskovsky"><img src="https://avatars.githubusercontent.com/u/203525071?v=4" width="50" height="50" alt=""/></a>
107+
<a href="https://github.com/arbiv"><img src="https://avatars.githubusercontent.com/u/12132333?v=4" width="50" height="50" alt=""/></a>
104108
<a href="https://github.com/RoiTabach"><img src="https://avatars.githubusercontent.com/u/25003091?v=4" width="50" height="50" alt=""/></a>
105109
<a href="https://github.com/hahnbeelee"><img src="https://avatars.githubusercontent.com/u/55263191?v=4" width="50" height="50" alt=""/></a>
106110
<a href="https://github.com/seanglynn-thrive"><img src="https://avatars.githubusercontent.com/u/93200565?v=4" width="50" height="50" alt=""/></a>
@@ -199,6 +203,12 @@ For additional information and help, you can use one of these channels:
199203
<a href="https://github.com/nkmr-jp"><img src="https://avatars.githubusercontent.com/u/8490118?v=4" width="50" height="50" alt=""/></a>
200204
<a href="https://github.com/dbt-markwan"><img src="https://avatars.githubusercontent.com/u/114556261?v=4" width="50" height="50" alt=""/></a>
201205
<a href="https://github.com/pedro-klein-ext-bayer"><img src="https://avatars.githubusercontent.com/u/181362556?v=4" width="50" height="50" alt=""/></a>
206+
<a href="https://github.com/ClementSicard"><img src="https://avatars.githubusercontent.com/u/33360172?v=4" width="50" height="50" alt=""/></a>
207+
<a href="https://github.com/nickozilla"><img src="https://avatars.githubusercontent.com/u/14976256?v=4" width="50" height="50" alt=""/></a>
208+
<a href="https://github.com/Lawiss"><img src="https://avatars.githubusercontent.com/u/30115537?v=4" width="50" height="50" alt=""/></a>
209+
<a href="https://github.com/abhipalsingh"><img src="https://avatars.githubusercontent.com/u/57302403?v=4" width="50" height="50" alt=""/></a>
210+
<a href="https://github.com/pushrbx"><img src="https://avatars.githubusercontent.com/u/6832715?v=4" width="50" height="50" alt=""/></a>
211+
202212

203213

204214
<!-- markdownlint-restore -->

0 commit comments

Comments
 (0)