forked from strawberry-graphql/strawberry
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.18 KB
/
mypy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: 🦺 MyPy
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- "strawberry/**"
- "tests/**"
- ".github/workflows/mypy.yml"
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
id: setup-python
with:
python-version: '3.10'
architecture: x64
- uses: actions/checkout@v2
- run: pip install poetry
- run: poetry config experimental.new-installer false
- name: "Python dependencies cache"
id: cache-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-py-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: ${{ runner.os }}-py-${{ steps.setup-python.outputs.python-version }}-poetry-
- name: Install dependencies
run: poetry install
if: steps.cache-poetry-dependencies.outputs.cache-hit != 'true'
- run: mkdir -p .mypy_cache
- run: poetry run mypy --ignore-missing-imports --config-file mypy.ini --install-types --non-interactive --show-traceback strawberry