16
16
jobs :
17
17
unit-test-and-build :
18
18
runs-on : ubuntu-latest
19
+ timeout-minutes : 5
19
20
steps :
20
21
- name : Checkout
21
22
uses : actions/checkout@v4
@@ -52,16 +53,18 @@ jobs:
52
53
53
54
cypress-run :
54
55
runs-on : ${{ matrix.os }}
56
+ timeout-minutes : 15
55
57
strategy :
56
58
fail-fast : false
57
59
matrix :
58
- type : [e2e, component]
59
- browser : [firefox, chrome]
60
60
os : [ubuntu-latest]
61
- # TODO: re-enable once macos build is stable #590
62
- # include:
63
- # - os: macos-latest
64
- # browser: edge
61
+ browser : [firefox, chrome]
62
+ include :
63
+ - os : macos-latest
64
+ browser : webkit
65
+ - os : windows-latest
66
+ browser : edge
67
+
65
68
env :
66
69
COVERAGE : true
67
70
steps :
@@ -74,36 +77,41 @@ jobs:
74
77
node-version : ' lts/*'
75
78
cache : yarn
76
79
77
- - name : Test (E2E)
78
- if : matrix.type == 'e2e'
80
+ - name : Install WebKit support
81
+ if : matrix.browser == 'webkit'
82
+ run : yarn add playwright-webkit --dev --mode=update-lockfile
83
+
84
+ - name : Component test
85
+ # Component tests on webkit hang for some reason
86
+ if : matrix.browser != 'webkit'
87
+ uses : cypress-io/github-action@v6
88
+ with :
89
+ component : true
90
+ browser : ${{ matrix.browser }}
91
+
92
+ - name : E2E test
79
93
uses : cypress-io/github-action@v6
80
94
env :
81
95
BASE_URL : http://localhost:4173/
82
96
with :
97
+ install : ${{ matrix.browser == 'webkit' }} # Only install if not done in previous step
83
98
build : yarn run build --mode offline
84
99
start : yarn run preview
85
100
config : baseUrl=${{ env.BASE_URL }}
86
101
wait-on : ${{ env.BASE_URL }}
87
102
browser : ${{ matrix.browser }}
88
103
89
- - name : Test (component)
90
- if : matrix.type == 'component'
91
- uses : cypress-io/github-action@v6
92
- with :
93
- component : true
94
- browser : ${{ matrix.browser }}
95
-
96
104
- name : Upload screenshots
97
105
uses : actions/upload-artifact@v4
98
106
if : failure()
99
107
with :
100
- name : ' cypress-screenshots_${{ matrix.type }}_${{ matrix. browser }}_${{ matrix.os }}'
108
+ name : ' cypress-screenshots_${{ matrix.browser }}_${{ matrix.os }}'
101
109
path : tests/e2e/screenshots
102
110
103
111
- name : Upload coverage artifact
104
112
uses : actions/upload-artifact@v4
105
113
with :
106
- name : ' coverage_${{ matrix.type }}_ ${{ matrix.browser }}_${{ matrix.os }}'
114
+ name : ' coverage_cypress_ ${{ matrix.browser }}_${{ matrix.os }}'
107
115
path : coverage/lcov.info
108
116
retention-days : 4
109
117
0 commit comments