Skip to content

Commit

Permalink
ci(Cypress): GitHub Actions testing
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Jul 1, 2022
1 parent c68276b commit c1c1104
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
name: Cypress Tests

on: [push]
on: [push,pull_request]

jobs:

test-browser:
test-cypress:
name: itk-wasm browser tests
runs-on: ubuntu-20.04
container:
image: cypress/browsers:node16.14.0-chrome99-ff97
options: --user 1001

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install
run: |
npm install
npm ci
- name: Build
run: |
npm run build
- name: Test with Chrome
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v4
with:
browser: chrome
start: npm start
command: npm run test:chrome

- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots

- uses: actions/upload-artifact@v2
if: always()
with:
name: cypress-videos
path: cypress/videos

- name: Test with Firefox
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v4
with:
browser: firefox
command: npm run test:firefox

- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots

0 comments on commit c1c1104

Please sign in to comment.