-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (78 loc) · 2.39 KB
/
fe-e2e.yml
File metadata and controls
87 lines (78 loc) · 2.39 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Frontend E2E Workflow
on:
workflow_call:
secrets:
PERCY_TOKEN:
required: false
inputs:
GHA_REF:
type: string
required: true
GHA_BASE:
type: string
required: true
jobs:
e2e:
runs-on: ubuntu-latest
container:
image: cypress/browsers:22.15.0
options: --user 1001
timeout-minutes: 120
strategy:
matrix:
target: ['e2e']
jobIndex: [1, 2, 3, 4]
env:
jobCount: 4
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.GHA_REF }}
fetch-depth: 0
- name: Cache Node Modules
id: npm-cache
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install Cypress Binary
run: npx cypress install
- name: Fetch base branch
run: git fetch origin ${{ inputs.GHA_BASE }}:${{ inputs.GHA_BASE }} || true
- name: Affected Regression Tests
id: regressionTests
continue-on-error: true
uses: collaborationFactory/github-actions/.github/actions/run-many@master
with:
target: ${{ matrix.target }}
jobIndex: ${{ matrix.jobIndex }}
jobCount: ${{ env.jobCount }}
base: ${{ inputs.GHA_BASE }}
ref: ${{ inputs.GHA_REF }}
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_PARTIAL_BUILD: 1
DEV_STORIES: true
CYPRESS_INTERNAL_BROWSER_CONNECT_TIMEOUT: 300000
NODE_OPTIONS: --max-old-space-size=4096
CYPRESS_NO_COMMAND_LOG: 1
- name: Upload E2E Videos
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.target }}-${{ matrix.jobIndex }}-e2e-videos
path: |
dist/cypress/apps/**/videos/
retention-days: 3
- name: Upload A11Y Reports
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.target }}-${{ matrix.jobIndex }}-a11y-reports
path: |
dist/cypress/apps/**/a11y/html/
retention-days: 3
- name: Fail pipeline if regressionTests step failed
run: |
if [ "${{ steps.regressionTests.outcome }}" = "failure" ]; then
echo "Regression tests step failed, failing the pipeline."
exit 1
fi