2020-08-17 08:42:54 +00:00
|
|
|
name: run mypy
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: run mypy
|
2020-08-17 14:07:00 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-08-17 08:42:54 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
2021-02-01 07:16:55 +00:00
|
|
|
- name: Setup Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
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-
|
2020-08-17 08:42:54 +00:00
|
|
|
- name: Install deps
|
2021-12-29 08:36:23 +00:00
|
|
|
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli aiohttp httpx mypy
|
2021-06-23 08:00:17 +00:00
|
|
|
- name: Run mypy for --install-types
|
|
|
|
run: PATH=$HOME/.local/bin:$PATH mypy nvchecker nvchecker_source tests
|
|
|
|
continue-on-error: true
|
|
|
|
- name: Install types
|
|
|
|
run: PATH=$HOME/.local/bin:$PATH yes | mypy --install-types
|
2020-08-17 08:42:54 +00:00
|
|
|
- name: Run mypy
|
2020-08-17 14:07:00 +00:00
|
|
|
run: PATH=$HOME/.local/bin:$PATH mypy nvchecker nvchecker_source tests
|