Skip to content

Commit ecab914

Browse files
committed
ops: update python tests ci
1 parent 2f02240 commit ecab914

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/run-tests.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
1-
name: Tests
1+
name: Django Tests
22

33
on:
44
workflow_call:
55
workflow_dispatch:
66
push:
7+
branches:
8+
- main
79
pull_request:
10+
branches:
11+
- main
812

913
jobs:
10-
run-tests:
11-
name: Django tests
14+
tests:
15+
name: Django Tests
1216
runs-on: ubuntu-latest
1317
env:
1418
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
15-
PYTHONPATH: ${{ github.workspace }}
16-
BASE_DIR: ${{ github.workspace }}/reportdb
1719

1820
steps:
1921
- name: Checkout source
20-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2123

22-
- name: Set up Python 3.12
23-
uses: actions/setup-python@v4
24-
with:
25-
python-version: 3.12
26-
cache: 'pip'
27-
cache-dependency-path: requirements.txt
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
2826

2927
- name: Install dependencies
3028
run: |
31-
pip install -r requirements.txt
29+
uv sync --frozen
3230
3331
- name: Run Django tests
3432
working-directory: ${{ env.BASE_DIR }}
3533
run: |
36-
python manage.py test
34+
uv run reportdb/manage.py test
3735
3836
services:
3937
postgres:

0 commit comments

Comments
 (0)