Release / verify (push) Canceled after 0s
CI / checks (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / backend (push) Canceled after 0s
Release / test (push) Canceled after 0s
Release / publish (backend) (push) Canceled after 0s
Release / publish (frontend) (push) Canceled after 0s
Release / publish (proxy) (push) Canceled after 0s
Siehe CHANGELOG.md
62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
# Tests bei jedem Push/PR. Wird auch vom Release-Workflow wiederverwendet,
|
|
# damit ein Release-Tag nie Images baut, deren Tests nicht grün waren.
|
|
#
|
|
# Die Jobs laufen bewusst in Containern (`container:`): dann ist der
|
|
# Postgres-Service überall unter dem Namen "postgres" erreichbar — auf
|
|
# GitHub genauso wie auf einem Forgejo/Gitea-Runner im Docker-Modus.
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
backend:
|
|
runs-on: ubuntu-latest
|
|
# Volles Image (nicht -slim): enthält git für actions/checkout.
|
|
container: python:3.12
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
env:
|
|
POSTGRES_USER: opnexus
|
|
POSTGRES_PASSWORD: ci
|
|
# conftest.py erwartet eine DB, deren Name auf _test endet.
|
|
POSTGRES_DB: opnexus_test
|
|
options: >-
|
|
--health-cmd "pg_isready -U opnexus"
|
|
--health-interval 5s --health-timeout 5s --health-retries 10
|
|
env:
|
|
DATABASE_URL: postgresql+asyncpg://opnexus:ci@postgres:5432/opnexus_test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# pg_dump/pg_restore 16 wie im Backend-Image (Dumps nur gleiche Hauptversion).
|
|
- run: backend/scripts/install_pg_client.sh 16
|
|
- run: pip install -r backend/requirements.txt
|
|
- run: python -m pytest -q
|
|
working-directory: backend
|
|
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
container: node:20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: npm ci --no-audit --no-fund
|
|
working-directory: frontend
|
|
- run: npm run lint
|
|
working-directory: frontend
|
|
# next build prüft auch die Typen.
|
|
- run: npm run build
|
|
working-directory: frontend
|
|
|
|
# Schnelle Konsistenzprüfungen, die ohne Datenbank und Build auskommen.
|
|
checks:
|
|
runs-on: ubuntu-latest
|
|
container: node:20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: python3 scripts/check_i18n.py
|
|
- run: bash -n scripts/opnexus && bash -n scripts/check_version.sh && bash -n scripts/make_release_bundle.sh
|