build(deps-dev): bump mypy from 1.11.2 to 1.13.0 (#490) #969
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: Lint, Type checking and Test Python Package | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ main ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: false | |
jobs: | |
package-lint-and-test: | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} ${{ matrix.suffix }} | |
runs-on: ${{ matrix.image }} | |
strategy: | |
matrix: | |
os: [Ubuntu] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
poetry-version: ["1.7.1"] | |
include: | |
- os: Ubuntu | |
image: ubuntu-latest | |
fail-fast: false | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run image | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install poetry dependencies | |
run: | | |
poetry install | |
- name: Code style | |
run: | | |
poetry run python -m black --check . | |
poetry run python -m isort -c . | |
- name: Lint | |
run: | | |
poetry run python -m flake8 . | |
# poetry run python -m pylint . | |
- name: Typing | |
run: poetry run python -m mypy . | |
- name: Test | |
run: poetry run python -m pytest --cov=. --cov-report term --cov-report xml --cov-config .coveragerc --junitxml=testresults.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
flags: unittests | |
env_vars: OS,PYTHON | |
name: Python ${{ matrix.python-version }} on ${{ runner.os }} | |
# - name: Build HTML docs | |
# run: | | |
# poetry run python -m pip install --editable .[docs] | |
# cd docs | |
# make html | |
# cd .. |