-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (28 loc) · 801 Bytes
/
Makefile
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
TARGET := ci/
quick: install check_black check_mypy quick_test lint check_isort
all: quick test
install:
poetry install
check_black:
poetry run black --check $(TARGET)
check_mypy:
poetry run mypy $(TARGET)
quick_test:
poetry run pytest -m 'not external' -q --disable-warnings $(TARGET)
test:
poetry run pytest -v $(TARGET)
test_not_external:
poetry run pytest -v -m 'not external' $(TARGET)
lint:
poetry run flake8 $(TARGET)
check_isort:
# -rc -> recursive
poetry run isort --check-only $(TARGET)
# CI
# Note: CI caches the ~/.cache dir
ci_setup:
python -m pip install --upgrade pip poetry wheel
poetry config cache-dir ~/.cache/poetry
poetry config virtualenvs.create true
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.cache/poetry/virtualenvs