-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
42 lines (36 loc) · 928 Bytes
/
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
# Author: Nick Russo
# Purpose: Provide simple "make" targets for developers
# See README for details about each target.
# Default goal runs the "test" target
.DEFAULT_GOAL := test
.PHONY: test
test: clean lint unit dry
.PHONY: lint
lint:
@echo "Starting lint"
find . -name "*.yaml" | xargs yamllint -s
python tests/jsonlint.py
find . -name "*.py" | xargs pylint
find . -name "*.py" | xargs bandit --skip B101
find . -name "*.py" | xargs black -l 85 --check
@echo "Completed lint"
.PHONY: unit
unit:
@echo "Starting unit tests"
python -m pytest tests/ --verbose
@echo "Completed unit tests"
.PHONY: dry
dry:
@echo "Starting dryruns"
python runbook.py --dryrun --failonly
head -n 5 outputs/*
python runbook.py -d -s
head -n 5 outputs/*
@echo "Completed dryruns"
.PHONY: clean
clean:
@echo "Starting clean"
find . -name "*.pyc" | xargs -r rm
rm -f nornir.log
rm -rf outputs/
@echo "Starting clean"