Files
scha/.gitea/workflows/ci.yml
T
westfarn 629d337380
CI / test (pull_request) Successful in 3s
Unit Tests / test (pull_request) Successful in 3s
Isolate CI/deploy tests from host/prod DATABASE_URL.
Compose was interpolating ${DATABASE_URL} from the Act runner, so containerized tests could hit shared Postgres. Use COMPOSE_DATABASE_URL, an ephemeral compose project with down -v, and clear DB env in unit-test workflows.
2026-07-14 06:55:30 -05:00

31 lines
674 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
# Explicitly clear DB vars so host/prod DATABASE_URL cannot leak in.
DATABASE_URL: ""
DB_HOST: ""
run: |
uv run python manage.py test