-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (63 loc) · 2.29 KB
/
Copy pathsmoke-tests.yml
File metadata and controls
70 lines (63 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Smoke Tests
on:
workflow_dispatch:
repository_dispatch:
types: [trigger_smoke_tests]
env:
AWS_REGION: 'eu-west-2'
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for the actions/checkout
jobs:
smoke-tests:
if: ${{ github.ref == 'refs/heads/main' }}
name: Playwright smoke tests
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/install-cache
- name: Install packages
run: npm ci --no-audit --no-fund
- name: Setup Playwright
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test --grep @smoke
env:
baseURL: https://ukhsa-dashboard.data.gov.uk
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-smoke
path: playwright-report/
retention-days: 10
slack-notify:
name: Slack Notify
needs: [smoke-tests]
runs-on: ubuntu-latest
if: always()
steps:
- uses: actions/checkout@v3
- name: 'Report Success'
uses: ravsamhq/notify-slack-action@v1
if: ${{ needs.smoke-tests.result == 'success' }}
with:
status: success
notification_title: ':white_check_mark: {workflow} workflow has {status_message} :white_check_mark:'
message_format: '*{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>'
footer: '<{run_url}|View Run>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: 'Report Failure'
uses: ravsamhq/notify-slack-action@v1
if: ${{ needs.smoke-tests.result == 'failure' }}
with:
status: failure
notification_title: ':rotating_light: {workflow} workflow has {status_message} :rotating_light:'
message_format: '*{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>'
mention_groups: ${{ vars.SLACK_MENTION_USERS }}
mention_groups_when: 'failure,warnings'
footer: '<{run_url}|View Run>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}