Merge pull request #149 from BKWLD/dependabot/npm_and_yarn/npm_and_ya… #218
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: Cypress E2E Tests | |
on: push | |
# Based on https://docs.cypress.io/guides/continuous-integration/github-actions | |
jobs: | |
test: | |
name: Run Cypress Tests | |
runs-on: ubuntu-latest | |
steps: | |
# At the moment, versions greater than 16 were causing | |
# "digital envelope routines::unsupported" errors | |
# https://stackoverflow.com/a/69699772/59160 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cypress Run | |
uses: cypress-io/github-action@v5 | |
with: | |
install-command: yarn --frozen-lockfile --silent | |
build: yarn build:cypress | |
start: yarn start --cwd=demo | |
command-prefix: percy exec -- yarn | |
record: false | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
- name: Report Coverage | |
run: | | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
yarn run --silent nyc report --reporter=text-summary >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
- name: Capture Cypress Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Cypress Media | |
path: | | |
cypress/screenshots | |
cypress/videos | |
- name: Capture Coverage Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Coverage | |
path: coverage |