add pre-commit and enforce on travis (#37)

* add pre-commit and enforce on travis
This commit is contained in:
Dave Gallant
2019-10-14 22:18:01 -04:00
committed by GitHub
parent f72dd82771
commit 53666c643f
11 changed files with 611 additions and 584 deletions

View File

@@ -1,10 +1,35 @@
build:
SRC:=rfd
.PHONY: build
build:
rm -rf dist/
python setup.py sdist
.PHONY: push_test
push_test:
twine upload -r testpypi dist/*.tar.gz
.PHONY: push_prod
push_prod:
twine upload dist/*.tar.gz
twine upload dist/*.tar.gz
.PHONY: precommit
precommit: ## Run pre-commit
pre-commit run \
--all-files \
--show-diff-on-failure
.PHONY: lint
lint:
pylint $(SRC)
.PHONY: test
test:
pytest -v
.PHONY: pr
pr: precommit lint test
.PHONY: ci
ci: lint test