nvchecker/.github/workflows/mypy.yaml

29 lines
1.1 KiB
YAML

name: run mypy
on: [push, pull_request]
jobs:
build:
name: run mypy
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Cache
uses: actions/cache@v3
env:
cache-name: cache-pipmypy
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-cache-pip-
- name: Install deps
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli platformdirs aiohttp httpx mypy awesomeversion
- name: Run mypy for --install-types
run: PATH=$HOME/.local/bin:$PATH mypy --namespace-packages --explicit-package-bases nvchecker nvchecker_source tests
continue-on-error: true
- name: Install types
run: PATH=$HOME/.local/bin:$PATH yes | mypy --install-types
- name: Run mypy
run: PATH=$HOME/.local/bin:$PATH mypy --namespace-packages --explicit-package-bases nvchecker nvchecker_source tests