ci: pre-commit autoupdate (#100) #286
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
unit-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8, 3.9, 3.10.1] | |
django-version: [ | |
'3.2', | |
'4.0', | |
'4.1', | |
] | |
os: [ | |
ubuntu-20.04, | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install django==${{ matrix.django-version }} "bleach>=5,<6" coverage mock | |
python setup.py install | |
- name: Run coverage | |
run: | | |
coverage run --rcfile .coveragerc testproject/manage.py test --failfast django_bleach | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
pre-release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ | |
ubuntu-20.04, | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --pre django "bleach>=5,<6" coverage mock | |
python setup.py install | |
- name: Run tests | |
run: | | |
python testproject/manage.py test django_bleach |