-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (55 loc) · 1.76 KB
/
fe-e2e-test.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
name: FE e2e Test
on:
push:
branches:
- main
- release
- develop
- 1.**
pull_request:
branches:
- develop
jobs:
cypress-run:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- run: node -v; npm -v
- name: Cypress run
# Install NPM dependencies, cache them correctly and run all Cypress tests
uses: cypress-io/github-action@v4
timeout-minutes: 20
with:
browser: chrome
working-directory: ./iris-client-fe
build: npm ci --legacy-peer-deps
start: npm run serve -- --mode e2e_test
wait-on: http://localhost:8080/
wait-on-timeout: 300
config-file: cypress.config.ts
spec: "tests/e2e/**/*"
env:
CYPRESS_baseUrl: http://localhost:8080/
CYPRESS_auth_username: ${{ secrets.FE_TEST_AUTH_USERNAME }}
CYPRESS_auth_password: ${{ secrets.FE_TEST_AUTH_PASSWORD }}
CYPRESS_USE_DEDICATED_TEST_USER: true
CYPRESS_TEST_RUN_ID: ${{ github.run_id }}
VUE_APP_API_BASE_URL: ${{ secrets.FE_TEST_API_BASE_URL }}
VUE_APP_ENABLE_MOCK_SERVER: false
# NOTE: screenshots will be generated only if E2E test failed thus we store screenshots only on failures
- name: Store screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: |
**/tests/e2e/screenshots/**/*
# Test run video was always captured, so this action uses "always()" condition
- name: Store videos
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: |
**/tests/e2e/videos/*