Skip to content

e2e

e2e #7325

Workflow file for this run

name: e2e
on:
workflow_dispatch:
inputs:
url:
required: false
description: The URL to run the test suite against. If omitted, it runs against all.
type: string
deployment_status:
jobs:
e2e:
environment:
name: ${{ github.event.deployment.environment || 'Production' }}
url: ${{ github.event.inputs.url || github.event.deployment_status.environment_url }}
if: github.event.deployment_status.state == 'success' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- run: corepack enable
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version: lts/-1
cache: 'pnpm'
- run: pnpm install
- run: pnpm exec playwright install
- name: Run Playwright E2E tests
run: pnpm test:browser
env:
BASE_URL: ${{ github.event.inputs.url || github.event.deployment_status.environment_url }}
lighthouse:
environment:
name: ${{ github.event.deployment.environment || 'Production' }}
url: ${{ github.event.inputs.url || github.event.deployment_status.environment_url }}
if: github.event.deployment_status.state == 'success' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@fcd65974f7c4c2bf0ee9d09b84d2489183c29726 # v12
with:
urls: ${{ github.event.inputs.url || github.event.deployment_status.environment_url }}
uploadArtifacts: true
temporaryPublicStorage: true
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
warmup:
environment:
name: ${{ github.event.deployment.environment || 'Production' }}
url: ${{ github.event.inputs.url || github.event.deployment_status.environment_url }}
if: github.event.deployment_status.state == 'success' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: warmup jobs, sponsors and modules
run: |
curl -sS $BASE_URL/api/jobs
curl -sS $BASE_URL/api/sponsors
curl -sS $BASE_URL/api/v1/modules
env:
BASE_URL: ${{ github.event.inputs.url || github.event.deployment_status.environment_url }}