Skip to content

feat(calculator): Runna/Strava-style UX with suggested times, VDOT badge, and time slider #72

feat(calculator): Runna/Strava-style UX with suggested times, VDOT badge, and time slider

feat(calculator): Runna/Strava-style UX with suggested times, VDOT badge, and time slider #72

Workflow file for this run

name: E2E Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
e2e:
runs-on: ubuntu-latest
defaults:
run:
working-directory: vite-project
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: vite-project/package-lock.json
- name: Install dependencies
run: npm ci
# Restores prior Vite prebundles before tests; new prebundles are saved
# automatically at job end after Playwright starts the dev server.
- name: Cache Vite prebundle
uses: actions/cache@v4
with:
path: vite-project/node_modules/.vite
key: vite-prebundle-${{ runner.os }}-${{ hashFiles('vite-project/package-lock.json', 'vite-project/vite.config.ts') }}
restore-keys: |
vite-prebundle-${{ runner.os }}-
- name: Get Playwright version
id: playwright-version
run: echo "version=$(npx playwright --version | grep -oP '\d+\.\d+\.\d+')" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ steps.playwright-version.outputs.version }}-chromium
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install chromium
- name: Install Playwright system dependencies
run: npx playwright install-deps chromium
- name: Run E2E tests
run: npx playwright test
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: vite-project/playwright-report/
retention-days: 30