Bump mypy from 0.991 to 1.13.0 #142
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: Run mypy and pytest | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'release/*' | |
- 'staging' | |
- 'trying' | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
pytestmypy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
exclude: | |
- os: windows-latest | |
python-version: "3.8" | |
- os: windows-latest | |
python-version: "3.9" | |
- os: windows-latest | |
python-version: "3.11" | |
env: | |
DISPLAY: ':99.0' | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v3.3.0 | |
with: | |
submodules: true | |
- name: setup ubuntu-latest xvfb | |
uses: ./.github/actions/setup-ubuntu-latest-xvfb | |
if: runner.os == 'Linux' | |
# install libhdf5-dev untill we have wheels for python 3.11 | |
- name: install libhdf5 | |
run: | | |
sudo apt update | |
sudo apt install libhdf5-dev | |
shell: bash | |
if: runner.os == 'Linux' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4.3.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: | | |
pyproject.toml | |
requirements.txt | |
- name: upgrade pip setuptools wheel | |
run: python -m pip install --upgrade pip setuptools wheel | |
shell: bash | |
- name: install qcodes | |
run: | | |
pip install .[test] -c requirements.txt | |
- name: Run Mypy | |
run: mypy -p qcodes | |
- name: Run parallel tests | |
run: | | |
pytest -m "not serial" --cov=qcodes --cov-report xml --hypothesis-profile ci --durations=20 qcodes | |
# a subset of the tests fails when run in parallel on Windows so run those in serial here | |
- name: Run serial tests | |
run: | | |
pytest -m "serial" -n 0 --dist no --cov=qcodes --cov-report xml --cov-append --hypothesis-profile ci qcodes | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3.1.1 | |
with: | |
file: ./coverage.xml | |
env_vars: OS,PYTHON |