build(deps): bump cypress-io/github-action from 5 to 6 #1365
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
unit-test-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: yarn | |
- name: Install | |
run: yarn install | |
- name: Lint | |
env: | |
NODE_ENV: production | |
run: | | |
yarn run lint --no-fix | |
- name: Test | |
run: | | |
yarn run coverage:unit --colors | |
- name: Docs | |
uses: andstor/jsdoc-action@v1 | |
with: | |
config_file: jsdoc.conf.json | |
# TODO: upload to GH pages? | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage/lcov.info | |
name: '${{ github.job }}' | |
flags: unittests | |
fail_ci_if_error: false | |
- name: Build | |
run: yarn run build | |
cypress-run: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
browser: [firefox, chrome] | |
type: [e2e, component] | |
# TODO: re-enable once macos build is stable #590 | |
# include: | |
# - os: macos-latest | |
# browser: edge | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Test | |
uses: cypress-io/github-action@v6 | |
with: | |
start: yarn run serve --hide=CLIENT # turn off build output because it's absurdly long | |
wait-on: http://localhost:8080/ | |
config-file: cypress.config.js | |
component: ${{ matrix.type == 'component' }} | |
spec: | | |
tests/e2e/**/* | |
cypress/component/* | |
cypress/component/**/* | |
browser: ${{ matrix.browser }} | |
env: | |
CYPRESS_baseUrl: http://localhost:8080/ | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: tests/e2e/screenshots | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage/lcov.info | |
name: '${{ github.job }} ${{ matrix.os }} ${{ matrix.browser }} ${{ matrix.type }}' | |
flags: ${{ matrix.type }} | |
fail_ci_if_error: false |