Files
Charon/.github/workflows/playwright.yml
T
GitHub Actions df5befb840 fix(tests): improve context setup for audit logging in DNS provider service tests
- Updated context key definitions in dns_provider_service_test.go to use string constants instead of custom types for user_id, client_ip, and user_agent.
- Ensured proper context values are set in audit logging tests to avoid defaulting to "system" or empty values.
- Enhanced in-memory SQLite database setup in credential_service_test.go to use WAL mode and busy timeout for better concurrency during tests.
2026-01-12 07:27:00 +00:00

46 lines
1.5 KiB
YAML

name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Build Frontend
working-directory: frontend
run: npm run build
- name: Start Application Stack
run: docker compose -f .docker/compose/docker-compose.local.yml up -d
- name: Wait for Application Health
run: |
echo "Waiting for application to be ready..."
timeout 120 bash -c 'until curl -sf http://localhost:8080/api/v1/health > /dev/null; do
echo "Waiting for health endpoint..."
sleep 2
done'
echo "✅ Application is ready"
- name: Run Playwright tests
env:
PLAYWRIGHT_BASE_URL: http://localhost:8080
run: npx playwright test
- name: Stop Application Stack
if: always()
run: docker compose -f .docker/compose/docker-compose.local.yml down -v
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30