Skip to content

Bump mypy from 1.2.0 to 1.5.1 in /tools/deps #4471

Bump mypy from 1.2.0 to 1.5.1 in /tools/deps

Bump mypy from 1.2.0 to 1.5.1 in /tools/deps #4471

Workflow file for this run

name: Unit tests
on:
pull_request:
paths:
- ".github/workflows/unit_tests.yml"
- "nxdrive/**/*.py"
- "tests/*.py"
- "tests/unit/*.py"
- "tools/deps/*.txt"
push:
branches: [master]
paths:
- "nxdrive/**/*.py"
- "tests/*.py"
- "tests/unit/*.py"
jobs:
unit-tests-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9 # XXX_PYTHON
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
restore-keys: ${{ runner.os }}-pip-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
- uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
restore-keys: ${{ runner.os }}-tox-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
- name: Install tox
run: python -m pip install -r tools/deps/requirements-tox.txt
- name: Unit tests
run: tox -e unit
- name: Upload coverage to Codecov
if: ${{ success() }} || ${{ failure() }}
uses: codecov/[email protected]
with:
files: ./coverage.xml
flags: unit
env_vars: OS,PYTHON
unit-tests-macos:
runs-on: "macos-latest"
env:
SYSTEM_VERSION_COMPAT: 0
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9 # XXX_PYTHON
- uses: actions/cache@v3
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
restore-keys: ${{ runner.os }}-pip-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
- uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
restore-keys: ${{ runner.os }}-tox-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
- name: Install tox
run: python -m pip install -r tools/deps/requirements-tox.txt
- name: Unit tests
run: tox -e unit
- name: Upload coverage to Codecov
if: ${{ success() }} || ${{ failure() }}
uses: codecov/[email protected]
with:
files: ./coverage.xml
flags: unit
env_vars: OS,PYTHON
unit-tests-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9 # XXX_PYTHON
architecture: "x86"
- uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
restore-keys: ${{ runner.os }}-pip-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
# Cannot be used for now: OSError: [WinError 193] %1 is not a valid Win32 application
# - uses: actions/cache@v3
# with:
# path: .tox
# key: ${{ runner.os }}-tox-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
# restore-keys: ${{ runner.os }}-tox-${{ hashFiles('tools/deps/requirements-test.txt', 'tools/deps/requirements-tox.txt') }}
- name: Install tox
run: python -m pip install -r tools/deps/requirements-tox.txt
- name: Unit tests
run: tox -e unit
- name: Upload coverage to Codecov
if: ${{ success() }} || ${{ failure() }}
uses: codecov/[email protected]
with:
files: ./coverage.xml
flags: unit
env_vars: OS,PYTHON