Files
Aegis/.github/workflows/ci.yml
Kitos f45b7ea926
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
ci: add GitHub Actions lint and test pipeline [FASE-0.6]
Run ruff and pytest against Postgres and Redis service containers; document CI in README.
2026-05-18 13:19:29 +02:00

65 lines
1.4 KiB
YAML

name: Aegis CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
lint-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_DB: testdb
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: backend/requirements.txt
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install ruff
- name: Lint
run: ruff check app/ tests/
- name: Test
env:
DATABASE_URL: postgresql://test:test@localhost:5432/testdb
REDIS_URL: redis://localhost:6379/0
SECRET_KEY: ci-test-secret-key-not-for-production
run: pytest tests/ -v --tb=short