Skip to content

Download wasm-pack directly in CI workflow #1527

Download wasm-pack directly in CI workflow

Download wasm-pack directly in CI workflow #1527

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
VITE_MAPTILER_API_KEY: '${{ secrets.MAPTILER_API_KEY }}'
VITE_RESOURCE_BASE: 'https://atip.uk'
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- name: Install wasm-pack
run: |
FOLDER=wasm-pack-v0.15.0-x86_64-unknown-linux-musl
BINARY=wasm-pack
TARGET_FOLDER=~/.cargo/bin
curl -LO "https://github.com/wasm-bindgen/wasm-pack/releases/download/v0.15.0/${FOLDER}.tar.gz"
tar -xzf "${FOLDER}.tar.gz"
mkdir -p "${TARGET_FOLDER}"
mv "${FOLDER}/${BINARY}" "${TARGET_FOLDER}/${BINARY}"
- name: Install dependencies
run: npm ci
- name: Setup GOV.UK
run: npm run setup-govuk
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run type-checker
run: npm run check
- name: Run Playwright tests
run: npm test
- name: Upload test results
run: npx github-actions-ctrf ctrf/ctrf-report.json
if: always()
- name: Upload test results for historical report
uses: actions/upload-artifact@v7
with:
name: ctrf-report
path: ctrf/ctrf-report.json
if: always()