45 lines
912 B
YAML
45 lines
912 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: [macos, host]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: Install deps
|
|
run: npm ci
|
|
|
|
- name: Unit/Component tests (Vitest)
|
|
run: npm test
|
|
env:
|
|
CI: true
|
|
|
|
- name: Install Playwright browsers
|
|
run: npx playwright install --with-deps
|
|
|
|
- name: E2E tests (Playwright)
|
|
run: npm run test:e2e -- --reporter=line
|
|
env:
|
|
CI: true
|
|
|
|
- name: Upload Playwright report
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: playwright-report
|
|
path: playwright-report
|
|
if-no-files-found: ignore
|
|
retention-days: 3
|