forked from GitGuardian/ggshield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 1.2 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
SHELL :=/bin/bash
.PHONY: all test unittest functest coverage black flake8 isort lint update-pipfile-lock
.SILENT:
all:
echo "Test targets:"
echo " test Run all tests"
echo " unittest Run unit tests"
echo " coverage Run unit tests with coverage"
echo " functest Run functional tests"
echo ""
echo "Lint targets:"
echo " lint Run all lint targets"
echo " black Run black formatter"
echo " flake8 Run flake8 linter"
echo " isort Run isort linter"
echo ""
echo "Other targets:"
echo " update-pipfile-lock Update the Pipfile.lock"
test: unittest functest
unittest:
GIT_CONFIG_GLOBAL='' GIT_CONFIG_SYSTEM='' pipenv run pytest --disable-pytest-warnings -vvv tests/unit
functest:
scripts/run-functional-tests
coverage:
pipenv run coverage run --source ggshield -m pytest --disable-pytest-warnings tests/unit
pipenv run coverage report --fail-under=80
pipenv run coverage xml
pipenv run coverage html
black:
pipenv run black .
flake8:
pipenv run flake8
isort:
pipenv run isort **/*.py
lint: isort black flake8
update-pipfile-lock:
scripts/update-pipfile-lock/update-pipfile-lock