-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (41 loc) · 1.22 KB
/
fmt.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
43
44
45
46
47
48
49
50
51
52
name: fmt
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: set up python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install poetry
env:
POETRY_VERSION: "1.7.1"
run: |
curl -sSL https://install.python-poetry.org | python -
poetry config virtualenvs.create false
- name: Cache dependencies
id: cache-poetry-deps
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('poetry.lock') }}-fmt
- name: Install dependencies
if: steps.cache-poetry-deps.outputs.cache-hit != 'true'
run: poetry install --extras "psycopg2 pymssql" # install mypy extras
- name: mypy
run: poetry run mypy --config-file mypy.ini .
- name: test annotations
run: poetry run mypy --config-file mypy.ini tests/annotation_tests.py
- name: isort
run: poetry run isort --check .
- name: black
run: poetry run black --check .