Skip to content

internal: switch to ruff for formatting/linting #47

internal: switch to ruff for formatting/linting

internal: switch to ruff for formatting/linting #47

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
mysql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
django-version:
- "django32"
- "django42"
mysql-image:
- mysql:5.7
- mysql:latest
services:
mysql:
image: ${{ matrix.mysql-image }}
env:
MYSQL_ROOT_PASSWORD: mysql
MYSQL_DATABASE: mysql
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry tox tox-gh-actions
- name: Test with tox
run: tox -e ${{ matrix.django-version }}
env:
PLATFORM: ${{ matrix.platform }}
DB_BACKEND: mysql
DB_NAME: mysql
DB_USER: root
DB_PASSWORD: mysql
DB_HOST: 127.0.0.1
DB_PORT: 3306
postgres:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
django-version:
- "django32"
- "django42"
postgres-image:
- postgres:9.5
- postgres:latest
services:
postgres:
image: ${{ matrix.postgres-image }}
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry tox tox-gh-actions
- name: Test with tox
run: tox -e ${{ matrix.django-version }}
env:
PLATFORM: ${{ matrix.platform }}
DB_BACKEND: postgresql
DB_NAME: postgres
DB_USER: postgres
DB_PASSWORD: postgres
DB_HOST: localhost
DB_PORT: 5432
sqlite:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
django-version:
- "django32"
- "django42"
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry tox tox-gh-actions
- name: Test with tox
run: tox -e ${{ matrix.django-version }}
env:
PLATFORM: ${{ matrix.platform }}
DB_BACKEND: sqlite3
DB_NAME: ":memory:"