forked from chehsunliu/pytest-stepfunctions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (30 loc) · 832 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
LINTER_SRC := ./setup.py ./src ./tests
.PHONY: all
all: test lint
.PHONY: _base
_base:
@docker-compose up --build --no-start
.PHONY: test
test: _base
@echo "> Run the tests"
@docker-compose up --build --exit-code-from tester
@echo "> Copy coverage related files from the testing container"
@docker cp `docker-compose ps -q tester`:/app/coverage.xml .
@docker cp `docker-compose ps -q tester`:/app/htmlcov .
.PHONY: lint
lint: black flake8 mypy
.PHONY: black
black: _base
@echo "> Check black"
@docker-compose run --no-deps --rm tester \
black -l 120 --check $(LINTER_SRC)
.PHONY: flake8
flake8: _base
@echo "> Check flake8"
@docker-compose run --no-deps --rm tester \
flake8 $(LINTER_SRC)
.PHONY: mypy
mypy: _base
@echo "> Check mypy"
@docker-compose run --no-deps --rm tester \
mypy $(LINTER_SRC)