Skip to content

👷 Remove obsolete Django and Python. #32

👷 Remove obsolete Django and Python.

👷 Remove obsolete Django and Python. #32

Workflow file for this run

name: build
on: [push]
jobs:
build:
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} (${{ matrix.variant }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
django-version: ['4.2']
variant: [normal, yubikey, custom_user]
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 Tox and any other packages
run: pip install tox tox-gh-actions codecov
- name: Test with tox
run: tox
env:
DJANGO: ${{matrix.django-version}}
VARIANT: ${{matrix.variant}}
- name: Generate coverage XML report
run: coverage xml
- name: Codecov
uses: codecov/[email protected]
env:
PYTHON: ${{matrix.python-version}}
DJANGO: ${{matrix.django-version}}
VARIANT: ${{matrix.variant}}
with:
fail_ci_if_error: true
env_vars: PTYHON,DJANGO,VARIANT
code_quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Tox
run: pip install tox
- name: isort
run: tox -e isort
- name: flake8
run: tox -e flake8
publish:
name: Publish package to PyPI
runs-on: ubuntu-latest
needs:
- build
- code_quality
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Build sdist and wheel
run: |
pip install pip setuptools wheel --upgrade
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}