Skip to content

Drop support for (pytho3.8&&django.3.2), add support for (python3.11,3.12&&django5.0,django5.1) #74

Drop support for (pytho3.8&&django.3.2), add support for (python3.11,3.12&&django5.0,django5.1)

Drop support for (pytho3.8&&django.3.2), add support for (python3.11,3.12&&django5.0,django5.1) #74

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
lint:
name: Check code style
runs-on: ubuntu-latest
container: python:3-slim
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 black
- name: Blacken code
run: black . --safe --quiet
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements/*.txt'
- name: Upgrade packaging tools
run: python -m pip install --upgrade pip setuptools virtualenv wheel
- name: Install dependencies
run: python -m pip install --upgrade codecov tox
- name: Run tox targets for ${{ matrix.python-version }}
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d . | cut -f 1 -d '-')
- name: Upload coverage
run: |
codecov -e TOXENV,DJANGO