Skip to content

End-to-end tests v3 #47

End-to-end tests v3

End-to-end tests v3 #47

Workflow file for this run

name: vscroll build and tests
on:
pull_request:
workflow_dispatch:
inputs:
cause:
description: "Reason"
required: true
default: "Manual triggering"
jobs:
build_and_tests:
runs-on: ubuntu-latest
steps:
- name: Dispatched?
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "This is dispatched"
echo "Test reason: ${{ github.event.inputs.cause }}"
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install root dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Install test dependencies
run: cd tests && npm ci
- name: Run unit tests with coverage
run: npm run test:unit:coverage
- name: Install Playwright Browsers
run: cd tests && npx playwright install --with-deps chromium
- name: Run e2e tests with coverage
id: e2e
run: npm run test:e2e:coverage
- name: Upload e2e failure artifacts
uses: actions/upload-artifact@v4
if: ${{ !cancelled() && steps.e2e.outcome == 'failure' }}
with:
name: e2e-failure-artifacts
path: tests/.vitest-attachments/
if-no-files-found: ignore
retention-days: 14
- name: Upload coverage reports
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: coverage-reports
path: coverage/
retention-days: 30