Skip to content

Commit

Permalink
ops: update python tests ci
Browse files Browse the repository at this point in the history
  • Loading branch information
anorthall committed Feb 7, 2025
1 parent 2f02240 commit ecab914
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
name: Tests
name: Django Tests

on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
run-tests:
name: Django tests
tests:
name: Django Tests
runs-on: ubuntu-latest
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
PYTHONPATH: ${{ github.workspace }}
BASE_DIR: ${{ github.workspace }}/reportdb

steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install dependencies
run: |
pip install -r requirements.txt
uv sync --frozen
- name: Run Django tests
working-directory: ${{ env.BASE_DIR }}
run: |
python manage.py test
uv run reportdb/manage.py test
services:
postgres:
Expand Down

0 comments on commit ecab914

Please sign in to comment.