name: Cypress Tests on: pull_request: branches: - master - develop jobs: cypress-run: runs-on: ubuntu-latest # Update after https://github.com/cypress-io/cypress-docker-images/issues/487 container: cypress/browsers:node14.16.0-chrome90-ff88 steps: - name: Checkout uses: actions/checkout@v3 - uses: actions/cache@v3 id: yarn-and-build-cache with: path: | ~/.cache/Cypress build node_modules key: ${{ runner.os }}-node_modules-build-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-node_modules-build- - name: Build & Lint run: | yarn install yarn build yarn lint # Install NPM dependencies, cache them correctly # and run all Cypress tests - name: Cypress run uses: cypress-io/github-action@v2 with: start: yarn preview wait-on: 'http://localhost:3000' record: true headless: true env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}