.github/workflows/ci-e2e.yml

Summary

Maintainability
Test Coverage
name: CI - E2E

on:
  workflow_dispatch:
  schedule:
    - cron: "0 1 * * *"
  push:
    branches: [main]
  pull_request:
    branches: [main]

concurrency:
  group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  main:
    name: Cypress
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
    strategy:
      fail-fast: false # https://github.com/cypress-io/github-action/issues/48
      matrix:
        containers: [1, 2, 3, 4, 5]
    steps:
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

      - run: corepack enable pnpm

      - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
        with:
          node-version-file: ".nvmrc"

      - run: pnpm install --frozen-lockfile

      - uses: cypress-io/github-action@ebe8b24c4428922d0f793a5c4c96853a633180e3 # v6.6.0
        with:
          config-file: cypress.config.js
          install: false
          record: true
          parallel: true
          build: pnpm run cypress:build
          start: pnpm run start
          wait-on: "http://localhost:3000"
          browser: chrome
          spec: cypress/e2e/**
          tag: ${{ github.event_name }}
        env:
          CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4