feat: Visual regression tests #1210
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: End-to-end tests | |
on: | |
push: | |
branches: | |
- master | |
- release-candidate | |
- release | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- master | |
- release-candidate | |
- release | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-22.04 | |
environment: Happo CI Env | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- name: Checkout | |
# https://github.com/actions/checkout/releases/tag/v4.2.2 | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Setup nodejs | |
# https://github.com/actions/setup-node/releases/tag/v4.1.0 | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af | |
with: | |
node-version: ${{ matrix.node-version }} | |
# Install NPM dependencies, cache them correctly | |
# and run all Cypress tests | |
- name: Cypress with Happo | |
# https://github.com/cypress-io/github-action/releases/tag/v6.7.7 | |
uses: cypress-io/github-action@f1f0912d392f0d06bdd01fb9ebe3b3299e5806fb | |
with: | |
start: npm start | |
wait-on: 'http://localhost:3000' | |
wait-on-timeout: 120 | |
browser: chrome | |
command-prefix: npx happo-e2e -- npx | |
env: | |
HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }} | |
HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }} |