-
-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (50 loc) · 1.79 KB
/
typing.yaml
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
43
44
45
46
47
48
49
50
51
52
---
name: Typing
# yamllint disable-line rule:truthy
on:
push:
pull_request:
workflow_dispatch:
jobs:
mypy:
name: mypy on Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10"]
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2.4.0
- name: 🏗 Set up Python ${{ matrix.python }}
id: python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: 🏗 Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: ⤵️ Restore cached Python PIP packages
uses: actions/cache@v2.1.7
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ runner.os }}-v1-${{ steps.python.outputs.python-version }}-${{ hashFiles('.github/workflows/requirements.txt') }}
restore-keys: |
pip-${{ runner.os }}-v1-${{ steps.python.outputs.python-version }}-
- name: 🏗 Install workflow dependencies
run: |
pip install -r .github/workflows/requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: ⤵️ Restore cached Python virtual environment
id: cached-poetry-dependencies
uses: actions/cache@v2.1.7
with:
path: .venv
key: venv-${{ runner.os }}-v1-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
venv-${{ runner.os }}-v1-${{ steps.python.outputs.python-version }}-
- name: 🏗 Install dependencies
run: poetry install --no-interaction
- name: 🚀 Run mypy
run: poetry run mypy examples p1monitor tests