Skip to content

fix #115 correctly #217

fix #115 correctly

fix #115 correctly #217

Workflow file for this run

name: CI
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_DB: pguser
POSTGRES_USER: pguser
POSTGRES_PASSWORD: foobar
options: >-
--health-cmd "pg_isready -U pguser"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:latest
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["3.2", "4.0", "4.1", "4.2", "5.0", "5.1"]
exclude:
- python-version: "3.8"
django-version: "5.0"
- python-version: "3.8"
django-version: "5.1"
- python-version: "3.9"
django-version: "5.0"
- python-version: "3.9"
django-version: "5.1"
- python-version: "3.11"
django-version: "3.2"
- python-version: "3.12"
django-version: "3.2"
- python-version: "3.12"
django-version: "4.0"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Run Tox
env:
DJANGO_VERSION: ${{ matrix.django-version }}
run: |
PYTHON_VERSION=`echo ${{ matrix.python-version }} | sed 's/\.//'`
DJANGO_VERSION=`echo $DJANGO_VERSION | sed 's/\.//'`
tox -e py${PYTHON_VERSION}-django${DJANGO_VERSION}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: true
flake8:
name: flake8
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install --upgrade flake8
- name: flake8
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: flake8
run: flake8