Skip to content

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

[pre-commit.ci] pre-commit autoupdate

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

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call: # Allow for the publish workflows to run the tests by calling this workflow
jobs:
test_compatibility:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: "pip"
- name: Install Tox
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions coverage
- name: Run test suite
run: |
tox
# Combine coverage reports from all tox environments
coverage combine
coverage report
# Coveralls does not support the .coverage file generated by coverage, so we convert it to xml
coverage xml
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
finish:
# Once all parallel jobs are finished, tell coveralls to mark the build as finished and have it calculate and comment coverage
needs: test_compatibility
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true