From 2f360c6362d32713a4711af555cd79583e643f55 Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 2 Sep 2021 16:25:06 +0200 Subject: [PATCH] Add Makefile for scripts management --- scripts/Makefile | 18 ++++++++++++++++++ scripts/requirements-dev.txt | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 scripts/Makefile create mode 100644 scripts/requirements-dev.txt diff --git a/scripts/Makefile b/scripts/Makefile new file mode 100644 index 000000000..bc226fd86 --- /dev/null +++ b/scripts/Makefile @@ -0,0 +1,18 @@ +.PHONY: lint test +.ONESHELL: + +SHELL := bash +CPU_CORES := $(shell nproc) + +all: lint test + +venv: + python3 -m venv venv + source venv/bin/active + pip install -r requirements-dev.txt + +lint: venv + pylint scripts + +test: venv + pytest -n ${CPU_CORES} --color=yes -v . diff --git a/scripts/requirements-dev.txt b/scripts/requirements-dev.txt new file mode 100644 index 000000000..430110048 --- /dev/null +++ b/scripts/requirements-dev.txt @@ -0,0 +1,3 @@ +pylint +pytest +pytest-xdist