name: Tests on: pull_request: branches: - master - develop jobs: cypress-run: runs-on: ubuntu-latest 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- - uses: actions/setup-node@v3 with: node-version: 16 cache: 'yarn' - name: Lint & Test run: | yarn install yarn lint yarn test:unit # Install NPM dependencies, cache them correctly # and run all Cypress tests - name: Cypress run uses: cypress-io/github-action@v3 with: build: yarn build start: yarn preview wait-on: 'http://localhost:3000' record: true headless: true env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}