Skip to content

Draft: Sync development into main for next release #151

Draft: Sync development into main for next release

Draft: Sync development into main for next release #151

Workflow file for this run

name: Tests
on:
push:
branches: [main,development]
paths:
- '**.py'
- 'requirements.txt'
- 'alembic.ini'
- '.github/workflows/tests.yml'
pull_request:
branches: [main,development]
paths:
- '**.py'
- 'requirements.txt'
- 'alembic.ini'
- '.github/workflows/tests.yml'
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: fireform
POSTGRES_PASSWORD: fireform
POSTGRES_DB: fireform
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U fireform"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: uv pip install --system -r requirements.txt
- name: Run tests
env:
PYTHONPATH: .
run: |
python -m pytest tests/ -v --tb=short
- name: Check for un-migrated model changes
env:
PYTHONPATH: .
DATABASE_URL: postgresql://fireform:fireform@localhost:5432/fireform
run: |
python -m alembic upgrade head
python -m alembic check