Skip to content

chore: Add mypy checks #1517

chore: Add mypy checks

chore: Add mypy checks #1517

Workflow file for this run

name: CI
on:
push:
branches: [ main, '0.55.x' ]
pull_request:
branches: [ main, '0.55.x' ]
jobs:
testenv:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
project: ['regular', 'headless_only']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
django-version: ['main', '3.2', '4.0', '4.1', '4.2', '5.0']
exclude:
- python-version: '3.11'
django-version: '3.2'
- python-version: '3.12'
django-version: '3.2'
- python-version: '3.7'
django-version: '4.0'
- python-version: '3.7'
django-version: '4.1'
- python-version: '3.7'
django-version: '4.2'
- python-version: '3.7'
django-version: '5.0'
- python-version: '3.8'
django-version: '5.0'
- python-version: '3.9'
django-version: '5.0'
- python-version: '3.7'
django-version: 'main'
- python-version: '3.8'
django-version: 'main'
- python-version: '3.9'
django-version: 'main'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Updating package list
run: sudo apt-get update
- name: Install xmlsec
run: sudo apt-get install -y xmlsec1 libxmlsec1-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions coveralls
- name: Tox Test
run: tox
env:
PYTHON_VER: ${{ matrix.python-version }}
DJANGO: ${{ matrix.django-version }}
PRJ: ${{ matrix.project }}
- name: Coverage (Coveralls)
if: ${{ success() && matrix.django-version == '5.0' && matrix.python-version == '3.12' && matrix.project == 'regular' }}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
extra:
runs-on: ubuntu-22.04
strategy:
matrix:
extra-env: ['docs', 'black', 'isort', 'flake8', 'mypy', 'standardjs', 'djlint', 'compilemessages']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
if: ${{ matrix.extra-env == 'standardjs' }}
with:
node-version: '8'
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Updating package list
run: sudo apt-get update
- name: Install xmlsec
run: sudo apt-get install -y xmlsec1 libxmlsec1-dev
- name: Install gettext
run: sudo apt-get install -y gettext
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Tox Test
run: tox
env:
TOXENV: ${{ matrix.extra-env }}