fix invalid dependency #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test app | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
django-version: ["4.2", "5.1"] | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: test_db | |
ports: | |
- 5432:5432 | |
# Add a health check to ensure postgres is ready | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
version: "latest" | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
env: | |
DJANGO_VERSION: ${{ matrix.django-version }} | |
run: | | |
uv sync --frozen | |
uv add "Django>${DJANGO_VERSION}" | |
- name: Run tests on python ${{ matrix.python-version }} | |
run: uv run pytest |