-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (79 loc) · 2.53 KB
/
cypress-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Cypress Tests
on:
push:
branches-ignore:
- "renovate/**"
jobs:
install:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-20.12.0-chrome-123.0.6312.86-1-ff-124.0.2-edge-123.0.2420.65-1
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress install
uses: cypress-io/github-action@v6
with:
runTests: false
# report machine parameters
- run: yarn cypress info
- run: node --version
- run: node -p 'os.cpus()'
# - run: yarn types
# - run: yarn lint
# - run: yarn test:unit:ci
- run: yarn build
- name: Save build folder
uses: actions/upload-artifact@v4
with:
name: build
if-no-files-found: error
path: dist
ui-chrome-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-20.12.0-chrome-123.0.6312.86-1-ff-124.0.2-edge-123.0.2420.65-1
options: --user 1001
needs: install
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving Cypress Cloud hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run copies of the current job in parallel
containers: [1, 2, 3, 4, 5]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download the build folders
uses: actions/download-artifact@v4
with:
name: build
path: dist
- name: Node info
run: node -v
- name: __e Dir
run: ls /__e
- name: "UI Tests - Chrome"
uses: cypress-io/github-action@v6
with:
build: yarn cypress info
start: yarn dev
wait-on: "http://localhost:3000/testing-cypress"
wait-on-timeout: 120
browser: chrome
record: true
parallel: true
group: "UI - Chrome"
spec: cypress/e2e/*
config-file: cypress.config.ts
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}