Skip to content

Landing Page

Landing Page #2

name: Landing Page
on:
workflow_dispatch:
inputs:
environment:
description: "Choose staging environment"
required: true
type: choice
options: [hoodi.staging, mainnet.staging]
tests_ref:
description: "Git ref (branch/tag/SHA) to run tests from"
required: true
default: "main"
type: string
defaults:
run:
working-directory: frontend
jobs:
run-landing-page-tests:
name: Landing Page • ${{ inputs.environment }} • ${{ inputs.tests_ref }}
runs-on: ubuntu-latest
env:
ENV: ${{ inputs.environment }}
steps:
- name: Checkout code (tests ref)
uses: actions/checkout@v4
with:
ref: ${{ inputs.tests_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright (@landing-page)
run: |
if [ "${ENV}" = "hoodi.staging" ]; then
ENV=hoodi.staging npx playwright test --config=tests/playwright.config.ts --grep @landing-page --reporter=html
else
ENV=mainnet.staging npx playwright test --config=tests/playwright.config.ts --grep @landing-page --reporter=html
fi
- name: Upload Playwright report (HTML)
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ inputs.environment }}-${{ inputs.tests_ref }}
path: frontend/playwright-report
retention-days: 7