Skip to content

Update dependency ts-jest to v29.1.3 (#2422) #8114

Update dependency ts-jest to v29.1.3 (#2422)

Update dependency ts-jest to v29.1.3 (#2422) #8114

Workflow file for this run

name: E2E tests
on:
# Configure this workflow to trigger on pull requests and pushes to main
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
permissions:
contents: read
actions: write
env:
NEXT_PUBLIC_API_BASE_URL: 'http://localhost:9090'
HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}
HAPPO_NONCE: '${{ github.run_id || github.event.pull_request.head.label || github.head_ref || github.ref }}'
concurrency:
# Group name from GitHub workflow example so it doesn't cancel jobs in parallel with matrix
# (https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix#example-workflow)
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
cypress:
name: Cypress
runs-on: ubuntu-latest
container: cypress/browsers:node-18.14.1-chrome-110.0.5481.96-1-ff-109.0-edge-110.0.1587.41-1@sha256:58a0ab8e7ec13931f11746e9f708baacf12c1fabf14cc5173e5ba2acbe5248f3
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving the Dashboard hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 2 copies of the current job in parallel
containers: [1, 2]
steps:
# Arrange
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
# Act
- name: Run Cypress
uses: cypress-io/github-action@9eda80f1cd0919c1edfa090b4f5b6ed5fce35878
with:
install-command: pnpm install
browser: chrome
build: pnpm build
start: |
pnpm serve
pnpm mock-api
wait-on: 'http://localhost:3000, ${{ env.NEXT_PUBLIC_API_BASE_URL }}'
record: true
parallel: true
group: merge
# tag will be "push", "pull_request", or "merge_group"
tag: ${{ github.event_name }}
command-prefix: ${{ github.event_name != 'merge_group' && 'pnpm exec happo-e2e -- pnpm exec' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
# - if the event is push, the title will be undefined
# and Cypress will get the commit message from Git information
# - if the event is pull_request, then we set the commit
# - if the event is merge_group, then we set the commit
# message to the pull request title
# https://github.com/cypress-io/github-action/issues/124#issuecomment-653180260
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.merge_group.head_commit.message }}
finalize-happo:
name: Finalize Happo
runs-on: ubuntu-latest
if: ${{ !cancelled() && github.event_name != 'merge_group' }}
needs: [cypress]
steps:
# Arrange
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
# Act
- name: Run Happo
run: pnpm exec happo-e2e finalize
dummy-happo:
name: Happo
runs-on: ubuntu-latest
if: ${{ !cancelled() && github.event_name == 'merge_group' }}
steps:
- name: Dummy Happo
run: echo "Dummy Happo in the queue"