name: Cypress Tests on: pull_request: branches: - master - develop jobs: cypress-run: runs-on: ubuntu-latest container: cypress/browsers:node14.16.0-chrome90-ff88 steps: - name: Checkout uses: actions/checkout@v2 - uses: actions/cache@v2 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: Lint run: | yarn install yarn run lint # Install NPM dependencies, cache them correctly # and run all Cypress tests - name: Cypress run uses: cypress-io/github-action@v2 with: build: yarn build start: yarn preview wait-on: 'http://localhost:3000' record: true headless: true env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}