docker-pre-commit/Makefile
Ian Fijolek af49bee4e5
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Add some tests and drone to run them
2020-01-28 15:21:42 -05:00

22 lines
570 B
Makefile

.PHONY: all test clean
all: test shellcheck
test: test-negative test-positive
.PHONY: shellcheck
shellcheck:
shellcheck *.sh
.PHONY: test-positive
test-positive:
@echo "Check valid compose file."
./compose-check.sh tests/docker-compose.yml || { echo 'fail'; exit 1; }
.PHONY: test-negative
test-negative:
@echo "Check bad file. Should error."
./compose-check.sh tests/docker-compose.bad.yml && { echo 'fail'; exit 1; } || echo 'ok'
@echo "Check multiple files. Should error."
./compose-check.sh tests/docker-compose* && { echo 'fail'; exit 1; } || echo 'ok'