Skip to content

Bump mypy from 1.12.1 to 1.13.0 (#457) #1261

Bump mypy from 1.12.1 to 1.13.0 (#457)

Bump mypy from 1.12.1 to 1.13.0 (#457) #1261

Workflow file for this run

name: CI
on:
push:
branches:
- '**' # run on all branches
pull_request:
branches:
- '**' # run on all branches
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v4
env:
cache-name: cache-pypi-modules
with:
# pip cache files are stored in `~/.cache/pip` on Linux
path: ~/.cache/pip
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('requirements/production.txt', 'requirements/testing.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Cache pre-commit packages
uses: actions/cache@v4
env:
cache-name: cache-pre-commit
with:
# pre-commit cache files are usually stored in `~/.cache/pre-commit` on Linux
path: ~/.cache/pre-commit
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install dependencies
run: pip install -r requirements/testing.txt
- name: Linter Pydocstyle
run: pydocstyle pyvlx test/*.py *.py examples/*.py
- name: Linter Flake8
run: flake8
- name: Linter Pylint
run: PYTHONPATH=. pylint --rcfile=.pylintrc pyvlx test/*.py *.py examples/*.py
- name: Mypy
run: mypy --install-types --non-interactive pyvlx
- name: Tests
run: PYTHONPATH=. pytest --cov pyvlx --cov-report xml
- name: Isort
run: isort --check-only test examples pyvlx
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: .coverage
include-hidden-files: true
coverage:
name: Process test coverage
runs-on: ubuntu-latest
needs: ["build"]
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v4
env:
cache-name: cache-pypi-modules
with:
# pip cache files are stored in `~/.cache/pip` on Linux
path: ~/.cache/pip
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('requirements/production.txt', 'requirements/testing.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Cache pre-commit packages
uses: actions/cache@v4
env:
cache-name: cache-pre-commit
with:
# pre-commit cache files are usually stored in `~/.cache/pre-commit` on Linux
path: ~/.cache/pre-commit
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install dependencies
run: |
pip install -r requirements/testing.txt
- name: Download all coverage artifacts
uses: actions/download-artifact@v4
- name: Create coverage report
run: |
coverage combine coverage*/.coverage*
coverage report --fail-under=79
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}