Skip to content

Updates action version #42

Updates action version

Updates action version #42

Workflow file for this run

name: Tests
concurrency:
group: django-squash-${{ github.head_ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- "**"
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
django-version:
- "3.2.*"
- "4.1.*"
- "4.2.*"
- "5.0.*"
exclude:
- { django-version: "5.0.*", python-version: "3.8" }
- { django-version: "5.0.*", python-version: "3.9" }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install prerequisites
run: python -m pip install --upgrade pip setuptools codecov pip install codecov django==${{ matrix.django-version }}
- name: Install packages
run: pip install -e '.[test]'
- name: Run tests
run: coverage run setup.py test
- name: Coverage check
run: coverage report -m --fail-under=85
- name: Coverage XML
run: coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
- name: Flake8 check
run: flake8
- name: iSort check
run: isort --check .
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: tests
steps:
- name: Publish package
# if: github.event_name == 'push' && startsWith(github.head_ref, 'master')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}