f316952c12
Reshapes .gitea/workflows/ around the new main ← development ← feature/* branching model: - go-unit.yaml — Go unit tests, runs on push/PR matching Go paths - ui-test.yaml — narrowed to Vitest + Playwright only (Go tests now live in go-unit.yaml) - integration.yaml — testcontainers suite, fires on PR to development/main and on push to development - dev-deploy.yaml — builds the stack and (re)deploys tools/dev-deploy/ on every merge into development - prod-build.yaml — builds prod images on push to main and uploads docker save bundles as artifacts (30-day retention) - deploy-prod.yaml — workflow_dispatch placeholder for the future SSH-based rollout ui-release.yaml is removed; its v* tag trigger is superseded by prod-build.yaml plus the manual deploy-prod entry point. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
name: ui-test
|
|
|
|
# UI-side unit and end-to-end tests (Vitest + Playwright). The Go side
|
|
# of the workspace is tested in `go-unit.yaml`. Both workflows can run
|
|
# in parallel for a push that touches Go and UI together.
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'ui/**'
|
|
- '.gitea/workflows/ui-test.yaml'
|
|
- '!**/*.md'
|
|
pull_request:
|
|
paths:
|
|
- 'ui/**'
|
|
- '.gitea/workflows/ui-test.yaml'
|
|
- '!**/*.md'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 11.0.7
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
cache-dependency-path: ui/pnpm-lock.yaml
|
|
|
|
- name: Install npm dependencies
|
|
working-directory: ui
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Install Playwright browsers
|
|
working-directory: ui/frontend
|
|
run: pnpm exec playwright install --with-deps
|
|
|
|
- name: Run Vitest
|
|
working-directory: ui/frontend
|
|
run: pnpm test
|
|
|
|
- name: Run Playwright
|
|
working-directory: ui/frontend
|
|
run: pnpm exec playwright test
|
|
|
|
- name: Upload Playwright report on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: playwright-report
|
|
path: ui/frontend/playwright-report/
|
|
retention-days: 14
|
|
|
|
- name: Upload Playwright traces on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: playwright-traces
|
|
path: ui/frontend/test-results/
|
|
retention-days: 14
|