From 3d5e293296f0686ebdaa47c79ef54ee38ef2dfa3 Mon Sep 17 00:00:00 2001 From: Daniel Gallagher Date: Mon, 28 May 2018 14:04:49 -0700 Subject: [PATCH] Have pre-commit run as part of running tests via tox --- Makefile | 4 ++-- tox.ini | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b76db57e..9b69930b 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,12 @@ REBUILD_FLAG = all: venv test .PHONY: venv -venv: .venv.touch +venv: .venv.touch install-hooks tox -e venv $(REBUILD_FLAG) .PHONY: tests test tests: test -test: .venv.touch +test: .venv.touch install-hooks tox $(REBUILD_FLAG) .venv.touch: setup.py requirements-dev.txt diff --git a/tox.ini b/tox.ini index b22fa156..cd506859 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,8 @@ setenv = PYTHONPATH = .:{envdir} commands= py.test + pre-commit install -f --install-hooks + pre-commit run --all-files [testenv:pre-commit] basepython=python3.6