Skip to content

ops: update python tests ci #48

ops: update python tests ci

ops: update python tests ci #48

Workflow file for this run

name: Django Tests
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
name: Django Tests
runs-on: ubuntu-latest
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
uv sync --frozen
- name: Run Django tests
working-directory: ${{ env.BASE_DIR }}
run: |
uv run reportdb/manage.py test
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5