Skip to content

upgrade lock file #1375

upgrade lock file

upgrade lock file #1375

Workflow file for this run

name: Test
permissions:
contents: read
concurrency:
group: test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
tags-ignore:
- "*"
branches: ["main"]
pull_request:
branches: ["main"]
paths:
- "src/**"
- "tests/**"
- ".github/workflows/test.yml"
- "pyproject.toml"
- "justfile"
merge_group:
workflow_call:
workflow_dispatch:
inputs:
debug:
description: "Open ssh debug session."
required: true
default: false
type: boolean
clear_cache:
description: "Clear GitHub Tool cache."
required: true
default: false
type: boolean
schedule:
# Every Sunday at 9:00 AM Los Angeles time.
# GitHub cron is UTC; 09:00 PT == 17:00 UTC (PST).
- cron: "0 17 * * 0"
jobs:
postgres:
runs-on: ubuntu-latest
permissions:
contents: read
# Service containers to run with `container-job`
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
postgres-version: ["12", "latest"]
psycopg-version: ["psycopg2", "psycopg3"]
django-version:
- "dj42" # LTS April 2026
- "dj52" # LTS April 2028
- "dj61" # April 2027
exclude:
- django-version: "dj42"
postgres-version: "latest"
- python-version: "3.13"
django-version: "dj42"
- python-version: "3.14"
django-version: "dj42"
- postgres-version: "12"
psycopg-version: "psycopg3"
- postgres-version: "12"
django-version: "dj52"
# https://github.com/psycopg/psycopg2/pull/1695
- python-version: "3.13"
psycopg-version: "psycopg2"
# https://github.com/psycopg/psycopg2/pull/1695
- python-version: "3.14"
psycopg-version: "psycopg2"
- postgres-version: "12"
django-version: "dj61"
- python-version: "3.10"
django-version: "dj61"
- python-version: "3.11"
django-version: "dj61"
# pin each image to its digest (satisfies zizmor unpinned-images)
# while keeping postgres-version driving the matrix
include:
- postgres-version: "12"
postgres-image: "postgres:12@sha256:2f2a8c2a7d10862e7fba2602e304523554f9df8244c632dafe2628ccb398fb5c"
- postgres-version: "latest"
postgres-image: "postgres:latest@sha256:8ff36f3c66371cba71d20ceedccfc3de9669a68737607888c4ef0af93abe8e39"
env:
RDBMS: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
COVERAGE_FILE: linux-py${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.psycopg-version }}-pg${{ matrix.postgres-version }}.coverage
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
TEST_DATABASE_CLIENT_VERSION: ${{ matrix.psycopg-version }}
TEST_DATABASE_VERSION: ${{ matrix.postgres-version }}
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: ${{ matrix.postgres-image }}
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Clear Tool cache
if: ${{ github.event.inputs.clear_cache == 'true' }}
run: sudo rm -rf /opt/hostedtoolcache
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
id: sp
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
enable-cache: false
- name: Setup Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@35b54afac29c97fb54faba5b513f8fbd1882f113
timeout-minutes: 60
- name: Run Unit Tests
env:
TEST_PYTHON: ${{ steps.sp.outputs.python-path }}
run: |
just test-all --group "$TEST_DATABASE_CLIENT_VERSION" -p "$TEST_PYTHON" --group "$TEST_DJANGO_VERSION"
- name: Store coverage files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
- name: Store env files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: requirements-${{ env.COVERAGE_FILE }}.txt
path: requirements-test*.txt
if-no-files-found: ignore
sqlite:
runs-on: ubuntu-latest
permissions:
contents: read
env:
RDBMS: sqlite
COVERAGE_FILE: linux-py${{ matrix.python-version }}-${{ matrix.django-version }}-sqlite.coverage
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
TEST_DATABASE_VERSION: "sqlite"
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.14"]
django-version:
- "dj42" # LTS April 2024
- "dj52" # LTS April 2028
- "dj61" # April 2027
exclude:
- python-version: "3.12"
django-version: "dj42"
- python-version: "3.14"
django-version: "dj42"
- python-version: "3.10"
django-version: "dj52"
- python-version: "3.14"
django-version: "dj52"
- python-version: "3.10"
django-version: "dj61"
- python-version: "3.12"
django-version: "dj61"
steps:
- name: Clear Tool cache
if: ${{ github.event.inputs.clear_cache == 'true' }}
run: sudo rm -rf /opt/hostedtoolcache
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
id: sp
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
enable-cache: false
- name: Setup Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@35b54afac29c97fb54faba5b513f8fbd1882f113
timeout-minutes: 60
- name: Run Unit Tests
env:
TEST_PYTHON: ${{ steps.sp.outputs.python-path }}
run: |
just test-all -p "$TEST_PYTHON" --group "$TEST_DJANGO_VERSION"
- name: Store coverage files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
- name: Store env files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: requirements-${{ env.COVERAGE_FILE }}.txt
path: requirements-test*.txt
if-no-files-found: ignore
mysql:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.14"]
mysql-version: ["8.0", "latest"]
mysqlclient-version: ["mysqlclient14", "mysqlclient2x"]
django-version:
- "dj42" # LTS April 2024
- "dj52" # LTS April 2028
- "dj61" # April 2027
exclude:
- django-version: "dj42"
mysql-version: "latest"
- django-version: "dj61"
mysql-version: "8.0"
- mysql-version: "latest"
mysqlclient-version: "mysqlclient14"
- python-version: "3.12"
django-version: "dj42"
- python-version: "3.14"
django-version: "dj42"
- python-version: "3.10"
django-version: "dj52"
- python-version: "3.14"
django-version: "dj52"
- django-version: "dj52"
mysqlclient-version: "mysqlclient14"
- python-version: "3.10"
django-version: "dj61"
- python-version: "3.12"
django-version: "dj61"
# pin each image to its digest (satisfies zizmor unpinned-images)
# while keeping mysql-version driving the matrix
include:
- mysql-version: "8.0"
mysql-image: "mysql:8.0@sha256:7dcddc01f13bab2f15cde676d44d01f61fc9f99fe7785e86196dfc07d358ae2b"
- mysql-version: "latest"
mysql-image: "mysql:latest@sha256:c11782aa2a96624c1efc121768641d96954faa136d6aa82751b032d8c426ffbc"
env:
RDBMS: mysql
MYSQL_VERSION: ${{ matrix.mysql-version }}
COVERAGE_FILE: linux-py${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.mysqlclient-version }}-mysql${{ matrix.mysql-version }}.coverage
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
TEST_DATABASE_CLIENT_VERSION: ${{ matrix.mysqlclient-version }}
TEST_DATABASE_VERSION: ${{ matrix.mysql-version }}
services:
mysql:
# Docker Hub image
image: ${{ matrix.mysql-image }}
# Provide the password for mysql
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
# Set health checks to wait until mysql has started
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 3306 on service container to the host
- 3306:3306
steps:
- name: Clear Tool cache
if: ${{ github.event.inputs.clear_cache == 'true' }}
run: sudo rm -rf /opt/hostedtoolcache
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
id: sp
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@35b54afac29c97fb54faba5b513f8fbd1882f113
timeout-minutes: 60
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
enable-cache: false
- name: Setup Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: Run Unit Tests
env:
TEST_PYTHON: ${{ steps.sp.outputs.python-path }}
run: |
just test-all --group "$TEST_DATABASE_CLIENT_VERSION" -p "$TEST_PYTHON" --group "$TEST_DJANGO_VERSION"
- name: Store coverage files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
- name: Store env files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: requirements-${{ env.COVERAGE_FILE }}.txt
path: requirements-test*.txt
if-no-files-found: ignore
mariadb:
runs-on: ubuntu-latest
permissions:
contents: read
env:
RDBMS: mariadb
COVERAGE_FILE: linux-py${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.mysqlclient-version }}-mariadb${{ matrix.mariadb-version }}.coverage
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
TEST_DATABASE_CLIENT_VERSION: ${{ matrix.mysqlclient-version }}
TEST_DATABASE_VERSION: ${{ matrix.mariadb-version }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.14"]
mysqlclient-version: ["mysqlclient14", "mysqlclient2x"]
mariadb-version: ["10.4", "latest"]
mariadb-healthcheck:
["mysqladmin ping", "healthcheck.sh --connect --innodb_initialized"]
django-version:
- "dj42" # LTS April 2024
- "dj52" # LTS April 2028
- "dj61" # April 2027
exclude:
- django-version: "dj42"
mariadb-version: "latest"
- django-version: "dj52"
mariadb-version: "10.4"
- django-version: "dj61"
mariadb-version: "10.4"
- mariadb-version: "latest"
mysqlclient-version: "mysqlclient14"
- python-version: "3.12"
django-version: "dj42"
- python-version: "3.14"
django-version: "dj42"
- python-version: "3.10"
django-version: "dj52"
- python-version: "3.14"
django-version: "dj52"
- django-version: "dj52"
mysqlclient-version: "mysqlclient14"
- python-version: "3.10"
django-version: "dj61"
- python-version: "3.12"
django-version: "dj61"
- mariadb-version: "10.4"
mysqlclient-version: "mysqlclient2x"
- mariadb-version: "latest"
mariadb-healthcheck: "mysqladmin ping"
- mariadb-version: "10.4"
mariadb-healthcheck: "healthcheck.sh --connect --innodb_initialized"
# pin each image to its digest (satisfies zizmor unpinned-images)
# while keeping mariadb-version driving the matrix
include:
- mariadb-version: "10.4"
mariadb-image: "mariadb:10.4@sha256:22edfe1c78349f8cae88bbb5c2873b7e6c515be767c91c691308ce57445806f3"
- mariadb-version: "latest"
mariadb-image: "mariadb:latest@sha256:6a4c4bbf0447c2247801309513fcc0dd17c3f35390368139ce419387fdd1144d"
services:
mysql:
# Docker Hub image
image: ${{ matrix.mariadb-image }}
# Provide the password for mysql
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
# Set health checks to wait until mysql has started
options: >-
--health-cmd="${{ matrix.mariadb-healthcheck }}"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 3306 on service container to the host
- 3306:3306
steps:
- name: Clear Tool cache
if: ${{ github.event.inputs.clear_cache == 'true' }}
run: sudo rm -rf /opt/hostedtoolcache
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
id: sp
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@35b54afac29c97fb54faba5b513f8fbd1882f113
timeout-minutes: 60
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
enable-cache: false
- name: Setup Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: Run Unit Tests
env:
TEST_PYTHON: ${{ steps.sp.outputs.python-path }}
run: |
just test-all --group "$TEST_DATABASE_CLIENT_VERSION" -p "$TEST_PYTHON" --group "$TEST_DJANGO_VERSION"
- name: Store coverage files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
- name: Store env files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: requirements-${{ env.COVERAGE_FILE }}.txt
path: requirements-test*.txt
if-no-files-found: ignore
oracle:
runs-on: ubuntu-latest
permissions:
contents: read
env:
RDBMS: oracle
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
TEST_DATABASE_VERSION: ${{ matrix.oracle-version }}
# oracle bug is encountered in Linux CI - does not manifest using same
# oracle DB containers on OSX
IGNORE_ORA_01843: True
IGNORE_ORA_00932: True
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.14"]
django-version:
- "dj42" # LTS April 2026
- "dj52" # LTS April 2028
- "dj61" # April 2027
oracle-version:
- "oracle-xe:21"
- "oracle-free:latest"
exclude:
- python-version: "3.12"
django-version: "dj42"
- python-version: "3.14"
django-version: "dj42"
- python-version: "3.10"
django-version: "dj52"
- python-version: "3.14"
django-version: "dj52"
- python-version: "3.10"
django-version: "dj61"
- python-version: "3.12"
django-version: "dj61"
- django-version: "dj42"
oracle-version: "oracle-free:latest"
- django-version: "dj52"
oracle-version: "oracle-xe:21"
- django-version: "dj61"
oracle-version: "oracle-xe:21"
# pin each image to its digest (satisfies zizmor unpinned-images)
# while keeping oracle-version driving the matrix
include:
- oracle-version: "oracle-xe:21"
oracle-image: "gvenzl/oracle-xe:21@sha256:c2682a4216b0fe65537912c4a049c7e5c15a85bb7c94bb8137d5f2d2eef60603"
- oracle-version: "oracle-free:latest"
oracle-image: "gvenzl/oracle-free:latest@sha256:e2763af84ecc345d48e4e3fe7999d0b7bb57885b6e0166051acd5f62e27eb605"
services:
oracle:
image: ${{ matrix.oracle-image }}
env:
ORACLE_PASSWORD: password
# Forward Oracle port
ports:
- 1521:1521
# Provide healthcheck script options for startup
options: >-
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- name: Clear Tool cache
if: ${{ github.event.inputs.clear_cache == 'true' }}
run: sudo rm -rf /opt/hostedtoolcache
- name: Set coverage file
run: |
ORACLE_TAG=$(echo "$TEST_DATABASE_VERSION" | cut -d':' -f2)
echo "COVERAGE_FILE=linux-py${TEST_PYTHON_VERSION}-${TEST_DJANGO_VERSION}-oracle${ORACLE_TAG}.coverage" >> $GITHUB_ENV
if [[ "$TEST_DJANGO_VERSION" == "dj42" ]]; then
echo "ORACLE_DATABASE=XEPDB1" >> $GITHUB_ENV
else
echo "ORACLE_DATABASE=FREEPDB1" >> $GITHUB_ENV
fi
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
id: sp
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@35b54afac29c97fb54faba5b513f8fbd1882f113
timeout-minutes: 60
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
enable-cache: false
- name: Setup Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: Install Oracle Client
# https://askubuntu.com/questions/1512196/libaio1-on-noble
run: |
sudo apt install alien libaio1t64
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
if [[ "$TEST_DJANGO_VERSION" == "dj42" ]]; then
curl --output oracle-client.rpm https://download.oracle.com/otn_software/linux/instantclient/2116000/oracle-instantclient-basiclite-21.16.0.0.0-1.el8.x86_64.rpm
sudo alien -i oracle-client.rpm
sudo sh -c "echo /usr/lib/oracle/21/client64/lib/ > /etc/ld.so.conf.d/oracle.conf"
else
curl --output oracle-client.rpm https://download.oracle.com/otn_software/linux/instantclient/2326000/oracle-instantclient-basiclite-23.26.0.0.0-1.el9.x86_64.rpm
sudo alien -i oracle-client.rpm
sudo sh -c "echo /usr/lib/oracle/23/client64/lib/ > /etc/ld.so.conf.d/oracle.conf"
fi
sudo ldconfig
- name: Run Full Unit Tests
env:
TEST_PYTHON: ${{ steps.sp.outputs.python-path }}
run: |
if [[ "$TEST_DJANGO_VERSION" == "dj42" ]]; then
just test-all --group cx_oracle -p "$TEST_PYTHON" --group "$TEST_DJANGO_VERSION"
else
just test-all --group oracledb -p "$TEST_PYTHON" --group "$TEST_DJANGO_VERSION"
fi
- name: Store coverage files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
- name: Store env files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: requirements-${{ env.COVERAGE_FILE }}.txt
path: requirements-test*.txt
if-no-files-found: ignore
windows:
runs-on: windows-latest
permissions:
contents: read
env:
RDBMS: sqlite
COVERAGE_FILE: windows-py${{ matrix.python-version }}-${{ matrix.django-version }}-sqlite.coverage
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
TEST_DATABASE_VERSION: "sqlite"
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.14"]
django-version:
- "dj42" # LTS April 2026
- "dj52" # LTS April 2028
- "dj61" # April 2027
exclude:
- python-version: "3.12"
django-version: "dj42"
- python-version: "3.14"
django-version: "dj42"
- python-version: "3.10"
django-version: "dj52"
- python-version: "3.14"
django-version: "dj52"
- python-version: "3.10"
django-version: "dj61"
- python-version: "3.12"
django-version: "dj61"
steps:
- name: Clear Tool cache
if: ${{ github.event.inputs.clear_cache == 'true' }}
run: sudo rm -rf /opt/hostedtoolcache
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
id: sp
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
enable-cache: false
- name: Setup Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: install-vim-windows
if: ${{ github.event.inputs.debug == 'true' }}
uses: rhysd/action-setup-vim@febef33995d6649302e9d88dda81e071b68f16a7
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@35b54afac29c97fb54faba5b513f8fbd1882f113
timeout-minutes: 60
- name: Run Unit Tests
env:
TEST_PYTHON: ${{ steps.sp.outputs.python-path }}
run: |
just test-all -p "$env:TEST_PYTHON" --group "$env:TEST_DJANGO_VERSION"
shell: pwsh
- name: Store coverage files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
- name: Store env files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: requirements-${{ env.COVERAGE_FILE }}.txt
path: requirements-test*.txt
if-no-files-found: ignore
macos:
runs-on: macos-latest
permissions:
contents: read
env:
RDBMS: sqlite
COVERAGE_FILE: macos-py${{ matrix.python-version }}-${{ matrix.django-version }}-sqlite.coverage
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
TEST_DATABASE_VERSION: "sqlite"
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.14"]
django-version:
- "dj42" # LTS April 2024
- "dj52" # LTS April 2028
- "dj61" # April 2027
exclude:
- python-version: "3.12"
django-version: "dj42"
- python-version: "3.14"
django-version: "dj42"
- python-version: "3.10"
django-version: "dj52"
- python-version: "3.14"
django-version: "dj52"
- python-version: "3.10"
django-version: "dj61"
- python-version: "3.12"
django-version: "dj61"
steps:
- name: Clear Tool cache
if: ${{ github.event.inputs.clear_cache == 'true' }}
run: sudo rm -rf /opt/hostedtoolcache
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
id: sp
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
enable-cache: false
- name: Setup Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: install-emacs-macos
if: ${{ github.event.inputs.debug == 'true' }}
run: |
brew install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@35b54afac29c97fb54faba5b513f8fbd1882f113
timeout-minutes: 60
- name: Run Unit Tests
env:
TEST_PYTHON: ${{ steps.sp.outputs.python-path }}
run: |
just test-all -p "$TEST_PYTHON" --group "$TEST_DJANGO_VERSION"
- name: Store coverage files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
- name: Store env files
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: requirements-${{ env.COVERAGE_FILE }}.txt
path: requirements-test*.txt
if-no-files-found: ignore
coverage-combine:
needs: [postgres, sqlite, mysql, mariadb, oracle, windows, macos]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # to allow codecov oidc upload
steps:
- name: Clear Tool cache
if: ${{ github.event.inputs.clear_cache == 'true' }}
run: sudo rm -rf /opt/hostedtoolcache
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
id: sp
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
enable-cache: false
- name: Setup Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: Get coverage files
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
pattern: "*.coverage"
merge-multiple: true
- run: ls -la *.coverage
- run: just coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f
with:
use_oidc: true
files: ./coverage.xml