Files
nuzlocke-tracker/.github/workflows/ci.yml
Julian Tabel 9a8a4f75f9
Some checks failed
CI / backend-tests (push) Failing after 1m13s
CI / frontend-tests (push) Successful in 27s
CI / e2e-tests (push) Has been cancelled
Use uv run for backend tests instead of system pip install
The uv-managed Python is externally managed and rejects --system pip
installs. Use uv run --extra dev to handle venv creation, dependency
installation, and test execution in a single step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 16:43:35 +01:00

99 lines
2.8 KiB
YAML

name: CI
on:
push:
branches: [develop]
paths-ignore:
- ".beans/**"
- "*.md"
- "LICENSE"
- ".gitignore"
- ".github/workflows/deploy.yml"
pull_request:
branches: [develop]
paths-ignore:
- ".beans/**"
- "*.md"
- "LICENSE"
- ".gitignore"
- ".github/workflows/deploy.yml"
permissions:
contents: read
jobs:
backend-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
ports:
- 5433:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: nuzlocke_test
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Install uv and Python
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
source "$HOME/.local/bin/env"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
uv python install 3.14
- name: Run tests
run: uv run --python 3.14 --extra dev pytest -q
working-directory: backend
env:
TEST_DATABASE_URL: postgresql+asyncpg://postgres:postgres@localhost:5433/nuzlocke_test
frontend-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "24"
- name: Install dependencies
run: npm ci
working-directory: frontend
- name: Run tests
run: npm test
working-directory: frontend
e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "24"
- name: Install dependencies
run: npm ci
working-directory: frontend
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
working-directory: frontend
- name: Run e2e tests
run: npm run test:e2e
working-directory: frontend
env:
E2E_API_URL: http://192.168.1.10:8100
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: playwright-report
path: frontend/playwright-report/