Unit Tests / test (push) Successful in 3s
## Summary - Dockerize SCHA Wheaton (uv packaging, Dockerfile, compose, entrypoint) and move secrets/DB config to env-driven `scha/settings/`. - Add Gitea Actions: unit tests on push/PR to `master`, auto-deploy on green master push via `server-infra/scripts/deploy.sh --app scha --env prod`. - Prod compose uses shared external Postgres only (no bundled DB); control-node secret template at `.env.prod.example`. Closes #19 (Part A). Depends on companion server-infra PR for catalog/host_apps registration. ## Test plan - [ ] `uv sync --frozen` + `DJANGO_ENV=dev DJANGO_SECRET_KEY=test uv run python manage.py check` - [ ] `docker compose build` succeeds locally - [ ] `docker compose up` serves app against bundled Postgres - [ ] `./scripts/validate-env.sh ~/Documents/secrets/scha/scha_prod.env` passes - [ ] After merge + server-infra catalog live: push to master runs Unit Tests then Deploy Reviewed-on: #21
28 lines
546 B
YAML
28 lines
546 B
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --frozen
|
|
|
|
- name: Run unit tests
|
|
env:
|
|
DJANGO_ENV: dev
|
|
DJANGO_SECRET_KEY: test-secret-key
|
|
run: |
|
|
uv run python manage.py test
|