-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.67 KB
/
run-e2e.yml
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
name: run-e2e
run-name: Running e2e tests
on:
push:
branches:
- '**'
workflow_dispatch:
branches:
- main
schedule:
# run every at every minute 25 of every hour monday to friday
- cron: '25 * * * 1-5'
# run at 00:25 and 12:25 on saturday and sunday
- cron: '25 0,12 * * 0,6'
jobs:
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
# Install npm dependencies, cache them correctly and run all Cypress tests
- name: Cypress run
id: cypress
uses: cypress-io/github-action@v6
with:
install-command: yarn install
env:
CYPRESS_BEARER_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
CYPRESS_NUA_KEY: ${{ secrets.NUA_KEY }}
CYPRESS_USER_NAME: ${{ secrets.USER_NAME }}
CYPRESS_USER_PWD: ${{ secrets.USER_PWD }}
# after the test run completes store reports and any screenshots
- name: Cypress reports
uses: actions/upload-artifact@v3
if: ${{ failure() && steps.cypress.conclusion == 'failure' }}
with:
name: cypress-reports
path: cypress/reports
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
- name: Discord notification
uses: cl8dep/[email protected]
if: ${{ failure() && steps.cypress.conclusion == 'failure' && github.ref_name == 'main' }}
with:
webhook: ${{ secrets.DISCORD_WEBHOOK_APPLICATION }}
message: |
⚠️ tests failed
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
username: 'Cypress E2E'