Skip to content

Commit c1c1104

Browse files
committed
ci(Cypress): GitHub Actions testing
1 parent c68276b commit c1c1104

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

.github/workflows/cypress.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,51 @@
11
name: Cypress Tests
22

3-
on: [push]
3+
on: [push,pull_request]
44

55
jobs:
66

7-
test-browser:
7+
test-cypress:
88
name: itk-wasm browser tests
99
runs-on: ubuntu-20.04
10-
container:
11-
image: cypress/browsers:node16.14.0-chrome99-ff97
12-
options: --user 1001
1310

1411
steps:
1512
- name: Checkout
1613
uses: actions/checkout@v3
1714

1815
- name: Install
1916
run: |
20-
npm install
17+
npm ci
2118
2219
- name: Build
2320
run: |
2421
npm run build
2522
2623
- name: Test with Chrome
27-
uses: cypress-io/github-action@v2
24+
uses: cypress-io/github-action@v4
2825
with:
2926
browser: chrome
30-
start: npm start
27+
command: npm run test:chrome
28+
29+
- uses: actions/upload-artifact@v2
30+
if: failure()
31+
with:
32+
name: cypress-screenshots
33+
path: cypress/screenshots
34+
35+
- uses: actions/upload-artifact@v2
36+
if: always()
37+
with:
38+
name: cypress-videos
39+
path: cypress/videos
3140

3241
- name: Test with Firefox
33-
uses: cypress-io/github-action@v2
42+
uses: cypress-io/github-action@v4
3443
with:
3544
browser: firefox
45+
command: npm run test:firefox
46+
47+
- uses: actions/upload-artifact@v2
48+
if: failure()
49+
with:
50+
name: cypress-screenshots
51+
path: cypress/screenshots

0 commit comments

Comments
 (0)