name: Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
run: curl -LsSf https://astral.sh/uv/0.8.8/install.sh | sh
- name: Run Python linting
run: uv run ruff check
- name: Run HTML linting
run: uv run djade main/templates/**/*.html
- name: Run Tests
run: |
uv run manage.py collectstatic --no-input
uv run manage.py test
env:
DEBUG: '1'
SECRET_KEY: 'thisisthesecretkey'
DATABASE_URL: 'postgres://postgres:postgres@localhost:5432/postgres'