/
Makefile
32 lines (25 loc) · 904 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
PYTHON = python3.10
.PHONY: help
help:
@echo " install install all dev and production dependencies (virtualenv is created as venv)"
@echo " clean remove unwanted stuff"
@echo " lint check style"
@echo " test run tests"
@echo " coverage run tests with code coverage"
.PHONY: install
install:
$(PYTHON) -m venv venv; . venv/bin/activate; $(PYTHON) -m pip install -r requirements_dev.txt
.PHONY: clean
clean:
rm -fr venv
.PHONY: lint
lint:
@. venv/bin/activate; find . -iname "*.py" -not -path "./venv/*" -not -path "./test/*" -exec echo "Linting {}" \; -exec pylint -rn {} \;
.PHONY: test
test:
@. venv/bin/activate; pytest -v --junitxml test/tests.xml
.PHONY: coverage
coverage:
@. venv/bin/activate; pytest --cov-report xml:test/coverage/cobertura-coverage.xml --cov=gen_edgerc --cov=httpie_edgegrid test/
.PHONY: all
all: clean install lint test coverage