Implements HTML report generation for E2E tests following the Shiori pattern. Reports are self-contained with base64-embedded screenshots for easy review in CI/CD pipelines. Changes: - Add e2e/e2eutil/reporter.go: HTML report generator with singleton pattern, collects test results and assertions - Enhance e2e/e2eutil/helper.go: Integrate reporter to automatically record assertions with screenshots on failures - Update e2e/playwright/login_test.go: Add TestMain to initialize reporter and generate HTML report after tests complete - Update .gitignore: Exclude test artifacts (screenshots, test-results, test binaries) - Update .woodpecker/ci.yml: Add e2e step with artifact generation - Fix webapp/src/services/auth.ts: Remove trailing newline Features: - Single self-contained HTML file with inline CSS - Base64-encoded screenshots embedded as data URIs - Visual styling (green for pass, red for fail) - Timestamps and detailed assertion information - Thread-safe reporter for concurrent test execution - Automatic screenshot capture on assertion failures Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
when:
|
|
event:
|
|
- push
|
|
- pull_request
|
|
branch:
|
|
- main
|
|
|
|
steps:
|
|
format:
|
|
image: golang:1.24
|
|
commands:
|
|
- make format
|
|
- git diff --exit-code # Fail if files were changed
|
|
|
|
lint-goreleaser:
|
|
image: goreleaser/goreleaser:latest
|
|
commands:
|
|
- goreleaser check
|
|
|
|
lint:
|
|
image: golang:1.24
|
|
commands:
|
|
- make ci-lint
|
|
|
|
test:
|
|
image: golang:1.24
|
|
commands:
|
|
- make test
|
|
|
|
e2e:
|
|
image: golang:1.24
|
|
environment:
|
|
TESTCONTAINERS_RYUK_DISABLED: true
|
|
DOCKER_HOST: unix:///var/run/docker.sock
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
commands:
|
|
# Install system dependencies
|
|
- apt-get update && apt-get install -y docker.io curl unzip
|
|
|
|
# Install Bun for webapp build
|
|
- curl -fsSL https://bun.sh/install | bash
|
|
- export PATH="$HOME/.bun/bin:$PATH"
|
|
|
|
# Install Playwright browsers
|
|
- go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps chromium
|
|
|
|
# Run e2e tests
|
|
- make e2e
|
|
when:
|
|
status: [success, failure]
|