forked from canonical/snapcraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (27 loc) · 1.01 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
.PHONY: autoformat-black
autoformat-black:
black .
.PHONY: test-black
test-black:
black --check --diff .
.PHONY: test-codespell
test-codespell:
codespell --quiet-level 4 --ignore-words-list keyserver --skip '*.tar,*.xz,*.zip,*.bz2,*.7z,*.gz,*.deb,*.rpm,*.snap,*.gpg,*.pyc,*.png,*.ico,*.jar,changelog,.git,.hg,.mypy_cache,.tox,.venv,_build,buck-out,__pycache__,build,dist,.vscode,parts,stage,prime,test_appstream.py,./snapcraft.spec,./.direnv'
.PHONY: test-flake8
test-flake8:
python3 -m flake8 .
.PHONY: test-mypy
test-mypy:
mypy .
.PHONY: test-shellcheck
test-shellcheck:
# Skip third-party gradlew script.
find . \( -name .git -o -name gradlew \) -prune -o -print0 | xargs -0 file -N | grep shell.script | cut -f1 -d: | xargs shellcheck
./tools/spread-shellcheck.py spread.yaml tests/spread/
.PHONY: test-units
test-units:
pytest --cov-report=xml --cov=snapcraft tests/unit
.PHONY: tests
tests: tests-static test-units
.PHONY: tests-static
tests-static: test-black test-codespell test-flake8 test-mypy test-shellcheck