-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test new artifacts and notifications failure logic
- Loading branch information
Showing
4 changed files
with
48 additions
and
27 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
.github/actions/failed-artifacts-and-slack-notifications/actions.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Create artifacts and slack notifications" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Copy failed screenshots | ||
shell: bash | ||
run: | | ||
mkdir /home/runner/work/vizro/vizro/vizro-core/failed_screenshots/ | ||
cp *.png failed_screenshots | ||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Failed screenshots | ||
path: | | ||
/home/runner/work/vizro/vizro/vizro-core/failed_screenshots/*.png | ||
- name: Send custom JSON data to Slack | ||
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"text": "${{ env.TESTS_NAME }} build result: ${{ job.status }}\nBranch: ${{ github.head_ref }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,29 +37,8 @@ jobs: | |
- name: Run e2e component library tests | ||
run: hatch run test-e2e-component-library | ||
|
||
- name: Copy failed screenshots | ||
- name: Create artifacts and slack notifications | ||
if: failure() | ||
run: | | ||
mkdir /home/runner/work/vizro/vizro/vizro-core/failed_screenshots/ | ||
cp *.png failed_screenshots | ||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: Failed screenshots | ||
path: | | ||
/home/runner/work/vizro/vizro/vizro-core/failed_screenshots/*.png | ||
- name: Send custom JSON data to Slack | ||
id: slack | ||
uses: slackapi/[email protected] | ||
if: failure() | ||
with: | ||
payload: | | ||
{ | ||
"text": "Vizro component tests build result: ${{ job.status }}\nBranch: ${{ github.head_ref }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
} | ||
uses: ./.github/actions/failed-artifacts-and-slack-notifications | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
TESTS_NAME: Vizro e2e component library tests |
File renamed without changes
This file contains 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