-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
438 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Playwright Tests | |
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 */1 * * *' # every hour | ||
- cron: "0 */1 * * *" # every hour | ||
|
||
jobs: | ||
test: | ||
|
@@ -18,10 +18,48 @@ jobs: | |
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
env: | ||
TRACETEST_API_TOKEN: ${{secrets.TRACETEST_TOKEN}} | ||
POKESHOP_DEMO_URL: ${{secrets.POKESHOP_DEMO_URL}} | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
- name: Send message on Slack in case of failure | ||
if: ${{ failure() }} | ||
uses: slackapi/[email protected] | ||
with: | ||
# check the block kit builder docs to understand how it works | ||
# and how to modify it: https://api.slack.com/block-kit | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": ":warning: Synthetic Monitoring Alert - E2E Playwright - Pokeshop Demo :warning:", | ||
"emoji": true | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Status:*\nFailed" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Pipeline:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SYNTETIC_MONITORING_SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
Oops, something went wrong.