fix: add Playwright, Valkey, and mock-OIDC to CI pipelines
- Add valkey and mock-oidc services to both release and dev workflows - Install Playwright with Chromium deps for headless e2e tests - Set WG_REDIS_URL and MOCK_OIDC_HOST env vars for CI - Make mock OIDC discovery URL configurable via MOCK_OIDC_HOST env var - Add full test job (unit + e2e) to dev pipeline before Docker build
This commit is contained in:
parent
2163c89b6a
commit
a06ce9e156
3 changed files with 79 additions and 2 deletions
|
|
@ -23,9 +23,23 @@ jobs:
|
|||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
valkey:
|
||||
image: valkey/valkey:8
|
||||
options: >-
|
||||
--health-cmd "valkey-cli ping"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
mock-oidc:
|
||||
image: ghcr.io/navikt/mock-oauth2-server:2.1.10
|
||||
env:
|
||||
SERVER_PORT: "9000"
|
||||
JSON_CONFIG: '{"interactiveLogin":true,"httpServer":"NettyWrapper","tokenCallbacks":[{"issuerId":"test-idp","tokenExpiry":3600,"requestMappings":[{"requestParam":"scope","match":"*","claims":{"sub":"$${claim:sub}","email":"$${claim:sub}@test.local","name":"Test User"}}]}]}'
|
||||
env:
|
||||
CI: "true"
|
||||
WG_DATABASE_URL: postgresql+asyncpg://wiregui:wiregui@postgres/wiregui
|
||||
WG_REDIS_URL: redis://valkey:6379/0
|
||||
MOCK_OIDC_HOST: mock-oidc
|
||||
steps:
|
||||
- name: Install system dependencies and checkout
|
||||
run: |
|
||||
|
|
@ -40,6 +54,9 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: uv sync
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: uv run playwright install --with-deps chromium
|
||||
|
||||
- name: Run unit tests
|
||||
run: uv run pytest tests/ --ignore=tests/e2e -v --tb=short
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue