Skip to content

[pre-commit.ci] pre-commit autoupdate #722

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #722

Workflow file for this run

name: Tox tests
on: [push, pull_request]
jobs:
test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.continue-on-error }}
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
django: [50, 42, 32]
cms: [nocms, cms311, async]
continue-on-error: [false]
exclude:
- django: 50
python-version: 3.9
- django: 50
python-version: 3.8
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}
- name: Cache tox
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-${{ format('{{py{0}-django{1}-{2}}}', matrix.python-version, matrix.django, matrix.cms) }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-tox-${{ format('{{py{0}-django{1}-{2}}}', matrix.python-version, matrix.django, matrix.cms) }}-
- name: Install dependencies
run: |
sudo apt-get install gettext
python -m pip install --upgrade pip setuptools tox>4
- name: Test with tox
env:
TOX_ENV: ${{ format('py{0}-django{1}-{2}', matrix.python-version, matrix.django, matrix.cms) }}
COMMAND: coverage run
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
tox -e$TOX_ENV
.tox/$TOX_ENV/bin/coverage xml
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
debug: true
files: ./coverage.xml
flag-name: run-${{ format('py{0}-django{1}-{2}', matrix.python-version, matrix.django, matrix.cms) }}
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
files: ./coverage.xml
fail_ci_if_error: false
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true