Files
rfd/Makefile
Dave Gallant cfd7e01e43 Add integration tests (#79)
Adds integration tests in pytest to detect breaking changes.
2020-08-15 20:55:10 -04:00

53 lines
963 B
Makefile

SRC := rfd
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
## build: Build a tar.gz of the python package
build:
> rm -rf dist/
> python setup.py sdist
.PHONY: build
## precommit: Run all pre-commit hooks
precommit:
> pre-commit run \
--all-files \
--show-diff-on-failure
.PHONY: precommit
## lint: Run static analysis on the code
lint:
> pylint $(SRC)
.PHONY: lint
## test: Run all unit tests
test:
> pytest -vvv tests
.PHONY: test
## pr: Run pre-commit, lint and test
pr: precommit lint test
.PHONY: pr
ci: lint test
.PHONY: ci
## help: Print this help message
help:
> @echo "Usage:"
> @echo
> @sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' | sort
> @echo
.PHONY: help