-
Notifications
You must be signed in to change notification settings - Fork 150
/
Makefile
47 lines (37 loc) · 1.07 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 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 " lock Update pdm.lock"
test: unittest functest
unittest:
pdm run pytest --disable-pytest-warnings -vvv tests/unit
functest:
scripts/run-functional-tests
coverage:
pdm run coverage run --source ggshield -m pytest --disable-pytest-warnings tests/unit
pdm run coverage report --fail-under=80
pdm run coverage xml
pdm run coverage html
black:
pdm run black .
flake8:
pdm run flake8
isort:
pdm run isort **/*.py
lint: isort black flake8
lock:
pdm lock --group :all