Skip to content

UUID help text

UUID help text #358

Workflow file for this run

# Adapted from https://docs.astral.sh/uv/guides/integration/github/#using-uv-in-github-actions
name: "tests"
on:
workflow_dispatch:
push:
branches:
- main
pull_request: ~
env:
PYTHON_VERSION: 3.13.1
UV_VERSION: 0.5.24
jobs:
run-django-tests:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:17.2-alpine3.21
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
redis:
image: redis:7.4.2-alpine3.21
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4.2.2
name: Checkout
- name: Install uv ${{ env.UV_VERSION }} & Python ${{ env.PYTHON_VERSION }}
uses: astral-sh/setup-uv@v5
with:
# The default value is "auto" and it resolves to "true" in Github-hosted runners, but explicit is better.
enable-cache: true
# uv can install Python, no need for actions/setup-python
# https://github.com/astral-sh/setup-uv?tab=readme-ov-file#do-i-still-need-actionssetup-python-alongside-setup-uv
# https://github.com/astral-sh/setup-uv?tab=readme-ov-file#python-version
python-version: ${{ env.PYTHON_VERSION }}
version: ${{ env.UV_VERSION }}
- name: Install packages
run: uv sync --frozen --no-install-project
- name: Run tests
working-directory: ./src
env:
APP_REDIS_URL: "redis://localhost:${{ job.services.redis.ports[6379] }}/1"
CELERY_BROKER_URL: ""
CELERY_RESULT_BACKEND: ""
DATABASE_HOST: "localhost"
DATABASE_NAME: "postgres"
DATABASE_USER: "postgres"
DATABASE_PASSWORD: "postgres"
DATABASE_PORT: "${{ job.services.postgres.ports[5432] }}"
SECRET_KEY: ""
USE_SSL: "false"
run: |
uv run python manage.py wait_for_db
uv run python manage.py wait_for_cache
uv run python manage.py test --parallel --shuffle