Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add make targets to lint and test the code and to build Docker image
The lint and test make targets use `tox` and can be found in `tox.mk`. The `docker` make target builds the Commodore Docker image and provides a binary version which is derived from the git repository state (using git-describe) and embedded into Commodore during the Docker image build. Signed-off-by: Simon Gerber <simon.gerber@vshn.ch>
- Loading branch information
Showing
5 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.PHONY: lint_flake8 lint_pylint lint_safety lint_bandit lint_readme | ||
|
||
TOX_COMMAND = docker run --rm -v $(PWD):/src:ro -v $(PWD)/.tox:/app/.tox docker.io/painless/tox | ||
|
||
lint_flake8: | ||
$(TOX_COMMAND) tox -e flake8 | ||
|
||
lint_pylint: | ||
$(TOX_COMMAND) tox -e pylint | ||
|
||
lint_safety: | ||
$(TOX_COMMAND) tox -e safety | ||
|
||
lint_bandit: | ||
$(TOX_COMMAND) tox -e bandit | ||
|
||
lint_readme: | ||
$(TOX_COMMAND) tox -e readme | ||
|
||
.PHONY: test_py36 test_py37 test_py38 | ||
|
||
test_py36: | ||
$(TOX_COMMAND) tox -e py36 | ||
|
||
test_py37: | ||
$(TOX_COMMAND) tox -e py37 | ||
|
||
test_py38: | ||
$(TOX_COMMAND) tox -e py38 |