Skip to content

Merge pull request #4 from vimukthi101/dependabot/github_actions/acti… #8

Merge pull request #4 from vimukthi101/dependabot/github_actions/acti…

Merge pull request #4 from vimukthi101/dependabot/github_actions/acti… #8

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
id-token: write # required for npm provenance on publish
jobs:
# Run Node-only unit tests across supported runtime versions.
unit-tests:
name: Unit tests (Node ${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node: [20, 22, 24]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci
- run: npm test
# Run Cypress integration tests against the example page.
# First run records a baseline, second run compares against it.
integration-tests:
name: Integration tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- uses: actions/cache@v5
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
cypress-${{ runner.os }}-
- run: npm ci
- name: Record performance baseline
run: npm run test:integration:record
env:
CYPRESS_PERF_BROWSER: chrome
- name: Compare against baseline (no regressions expected)
run: npm run test:integration:compare
env:
CYPRESS_PERF_BROWSER: chrome
- name: Upload perf report
if: always()
uses: actions/upload-artifact@v7
with:
name: perf-report
path: cypress/integration-reports/perf-report.html
if-no-files-found: ignore