fix for github pages #819
Workflow file for this run
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: Run Cypress and Jest Tests | |
on: [push, pull_request] | |
env: | |
CHILD_CONCURRENCY: 1 | |
NODE_ENV: test | |
CYPRESS_TEST_USERNAME: ${{ secrets.CYPRESS_TEST_USERNAME }} | |
CYPRESS_TEST_PASSWORD: ${{ secrets.CYPRESS_TEST_PASSWORD }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
jobs: | |
tests-run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.19.0] | |
steps: | |
- uses: actions/setup-node@v2.1.5 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Install NPM dependencies, cache them correctly | |
- name: Get versions | |
run: | | |
node --version | |
npm --version | |
git --version | |
# and run all Cypress tests | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 | |
with: | |
headless: true | |
record: true | |
build: yarn build | |
start: yarn start | |
wait-on: "http://localhost:3000" | |
wait-on-timeout: 600 | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
- name: Save Cypress Videos | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Cypress Videos | |
path: ./cypress/videos/ | |
- name: Cypress Coverage Summary | |
run: yarn coverage-summary | |
# run unit tests | |
- name: Run Jest Unit Tests | |
run: yarn test:unit | |
# Combine test coverage reports | |
- name: Combine Cypress & Jest coverage reports | |
run: yarn report:combined | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: coverage | |
path: ./coverage/lcov.info | |
- name: parsing jsdocs | |
run: yarn run doc | |
# TODO - maybe in future after we fix up the jsdoc errors, we can remove this line: | |
continue-on-error: true | |
- name: jsdocs update | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
file_pattern: 'docs/*' | |
commit_message: Apply jsdocs update | |
upload-to-codecov: | |
needs: [tests-run] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 |