From 8da7ce8ac3d43d4ff219dede8dced4f2719854f5 Mon Sep 17 00:00:00 2001
From: Andreas Tolfsen <andretol@usit.uio.no>
Date: Thu, 15 Jul 2021 10:36:42 +0200
Subject: [PATCH] build: run Mypy static analysis as part of "make test"

Fixes: GREG-13
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 50c66dd5..536380d4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
+MYPY ?= mypy
 PIP ?= pip -q
 POETRY ?= poetry
 PYTHON ?= python3.9
 VENV ?= venv
 
+mypy = $(MYPY) --config-file mypy.ini
 pip = python -m $(PIP)
 poetry = python -m $(POETRY)
 venv = . $(VENV)/bin/activate &&
@@ -21,6 +23,7 @@ $(VENV)/touchfile:
 
 .PHONY: test
 test: $(VENV)
+	$(venv) $(mypy) -p greg
 	$(venv) python manage.py test
 
 .PHONY: deps
-- 
GitLab