Skip to content

Commit

Permalink
KIT-67: Add slack notification to addon regression test workflow, fix…
Browse files Browse the repository at this point in the history
… upload path
  • Loading branch information
CobyPear committed Nov 9, 2023
1 parent 5c4be67 commit 1322271
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 2 deletions.
90 changes: 88 additions & 2 deletions .github/workflows/cli-addon-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,92 @@ jobs:
uses: actions/upload-artifact@v3
if: failure() || ${{ github.event_name }} != 'push'
with:
name: playwright-report
path: playwright-report/
name: ${{ matrix.label }}-playwright-report
path: ci-tests/playwright-report
retention-days: 30

- name: Send Slack message
if: success()
id: slack-success
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "${{ github.workflow }} Succeeded :large_green_circle:",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "${{ matrix.label }}"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"action_id": "basic_success_view",
"text": {
"type": "plain_text",
"text": "View Job"
},
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

- name: Send Slack message
if: failure()
id: slack-failure
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "${{ github.workflow }} Failed :red_circle:",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "${{ matrix.label }}"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"action_id": "basic_failure_view",
"text": {
"type": "plain_text",
"text": "View Job"
},
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Pantheon Systems Decoupled Kits

Tests:
[![CircleCI](https://circleci.com/gh/pantheon-systems/decoupled-kit-js/tree/canary.svg?style=svg)](https://circleci.com/gh/pantheon-systems/decoupled-kit-js/tree/canary)

![Headless regression testing](https://github.com/pantheon-systems/decoupled-kit-js/actions/workflows/cli-addon-tests.yml/badge.svg)
![Canary Release](https://github.com/pantheon-systems/decoupled-kit-js/actions/workflows/canary-release.yml/badge.svg)
![Split Canary Sites](https://github.com/pantheon-systems/decoupled-kit-js/actions/workflows/canary-sites-split.yml/badge.svg)
![Starter Split and Changesets](https://github.com/pantheon-systems/decoupled-kit-js/actions/workflows/release-and-split.yml/badge.svg)

- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Versions and Releases](#versions-and-releases)
Expand Down

0 comments on commit 1322271

Please sign in to comment.