-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
55 lines (44 loc) · 1.28 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
POETRY ?= $(HOME)/.poetry/bin/poetry
.PHONY: install-poetry
install-poetry:
@curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
.PHONY: install-deps
install-deps:
@$(POETRY) install -vv
.PHONY: install
install: install-poetry install-deps
.PHONY: lint-black
lint-black:
@echo "\033[92m< linting using black...\033[0m"
@$(POETRY) run black --check --diff .
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-flake8
lint-flake8:
@echo "\033[92m< linting using flake8...\033[0m"
@$(POETRY) run flake8 pynats tests
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-isort
lint-isort:
@echo "\033[92m< linting using isort...\033[0m"
@$(POETRY) run isort --check-only --diff .
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-mypy
lint-mypy:
@echo "\033[92m< linting using mypy...\033[0m"
@$(POETRY) run mypy --ignore-missing-imports --follow-imports=silent pynats tests
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint
lint: lint-black lint-flake8 lint-isort lint-mypy
.PHONY: test
test:
@$(POETRY) run pytest --cov-report term --cov-report html --cov=pynats -vv
.PHONY: codecov
codecov:
@$(POETRY) run codecov --token=$(CODECOV_TOKEN)
.PHONY: publish
publish:
@$(POETRY) publish --username=$(PYPI_USERNAME) --password=$(PYPI_PASSWORD) --build