-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
45 lines (36 loc) ยท 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SHELL := /bin/bash
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PROJECT_NAME = xunitslackreporter
#-----------------------------------------------------------------------
# Rules of Rules : Grouped rules that _doathing_
#-----------------------------------------------------------------------
test: lint pytest
build: build-dockerimage
#-----------------------------------------------------------------------
# Testing & Linting
#-----------------------------------------------------------------------
lint:
export PYTHONPATH=${ROOT_DIR}:$$PYTHONPATH;
mypy --install-types --non-interactive app;
pylint app;
pytest:
export PYTHONPATH=${ROOT_DIR}:$$PYTHONPATH && \
py.test tests
#-----------------------------------------------------------------------
# Run Rules
#-----------------------------------------------------------------------
run:
run.sh
# Run in Docker
run-docker:
docker run -it --rm --name ${PROJECT_NAME} \
${PROJECT_NAME}:latest
#-----------------------------------------------------------------------
# Docker Rules
#-----------------------------------------------------------------------
# Build Docker image
build-docker:
docker build -t ${PROJECT_NAME} .
# Deletes Docker image
clean-docker:
docker rm ${PROJECT_NAME}