add instrumented files for sake of Cypress Cloud #7
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: Cypress Tests | |
on: push | |
jobs: | |
install: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
run: npm install -g pnpm@9 | |
- name: Cypress install | |
uses: cypress-io/github-action@v6 | |
with: | |
# Disable running of tests within install job | |
runTests: false | |
build: pnpm instrument | |
- name: Save build folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
if-no-files-found: error | |
path: dist | |
cypress-run: | |
runs-on: ubuntu-22.04 | |
needs: install | |
strategy: | |
# don't fail the entire matrix on failure | |
fail-fast: false | |
matrix: | |
# run copies of the current job in parallel | |
containers: [1, 2, 3, 4, 5] | |
container: | |
image: cypress/browsers:node-20.14.0-chrome-126.0.6478.114-1-ff-127.0.1-edge-126.0.2592.61-1 | |
options: --user 1001 | |
steps: | |
- name: Install pnpm | |
run: npm install -g pnpm@9 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download the build folder | |
uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
record: true | |
parallel: true | |
group: 'UI-Chrome' | |
start: npm start | |
browser: chrome | |
ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}' | |
env: | |
# pass the Cypress Cloud record key as an environment variable | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |