-
Notifications
You must be signed in to change notification settings - Fork 22
63 lines (53 loc) · 1.62 KB
/
e2e-tests.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: E2E tests
on: [deployment_status]
jobs:
set_pending:
name: Register pending E2E tests
if: github.event.deployment_status.state == 'pending'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set status to "pending"
uses: ./.github/actions/set-pr-status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB }}
with:
state: pending
description: Waiting for E2E
run_tests:
name: Run E2E tests on deployment success
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
container: cypress/included:9.5.4
env:
NPM_RC: ${{ secrets.NPM_TOKEN }}
TERM: xterm
steps:
- uses: actions/checkout@v3
- name: Set status to "running"
uses: ./.github/actions/set-pr-status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB }}
with:
state: pending
description: E2E tests are running
- name: Install dependencies
run: yarn
- name: Run E2E tests
run: yarn e2e --config baseUrl=${{ github.event.deployment_status.target_url }}
- name: Set status to "success"
if: success()
uses: ./.github/actions/set-pr-status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB }}
with:
state: success
description: E2E tests are passed
- name: Set status to "failure"
if: failure()
uses: ./.github/actions/set-pr-status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB }}
with:
state: failure
description: Some of the E2E tests are failed