Bump mypy from 1.11.1 to 1.12.0 #112
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
inputs: {} | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out repo | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and upgrade dependencies | |
run: | | |
python -m pip install -U pip poetry | |
python3 -m poetry install | |
- name: Analysing the code with tox tests | |
run: poetry run tox -e py | |
- name: Runs tests with coverage | |
run: poetry run coverage run --parallel -m pytest | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-data-${{ matrix.python-version }} | |
path: ".coverage.*" | |
coverage: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
repository-projects: write | |
needs: build | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Install and upgrade dependencies | |
run: | | |
python -m pip install -U pip poetry | |
python3 -m poetry install | |
- name: Download coverage data | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: coverage-data-* | |
merge-multiple: true | |
- name: Combine coverage data | |
run: | | |
poetry run coverage combine | |
- name: Generate XML coverage report | |
run: | | |
poetry run coverage xml --fail-under=75 | |
- name: Display human readable report | |
run: | | |
poetry run coverage report --fail-under=75 | |
- name: Code Coverage Summary Report | |
uses: irongut/CodeCoverageSummary@v1.3.0 | |
with: | |
filename: coverage.xml | |
badge: true | |
fail_below_min: true | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: '60 80' | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
- name: Write to Job Summary | |
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | |
# Optional if you want to use codecov.io | |
# - name: Upload coverage report | |
# uses: codecov/codecov-action@v4 |