2020-10-25 20:31:41 +00:00
|
|
|
default: test
|
2020-10-26 17:01:12 +00:00
|
|
|
.PHONY: test docopt kcov codecov
|
2020-09-08 06:48:53 +00:00
|
|
|
|
2020-10-25 20:31:41 +00:00
|
|
|
test:
|
2020-10-26 16:49:21 +00:00
|
|
|
@docker run \
|
|
|
|
-it \
|
|
|
|
--rm \
|
2020-10-26 17:01:12 +00:00
|
|
|
-v $$(pwd):/workdir \
|
2020-10-26 16:49:21 +00:00
|
|
|
docker:dind \
|
|
|
|
apk add bats && bats test.bats
|
2020-09-08 07:19:03 +00:00
|
|
|
|
2020-10-25 20:41:17 +00:00
|
|
|
docopt:
|
|
|
|
@if [ ! -d ".venv" ]; then \
|
|
|
|
python3 -m venv .venv && \
|
|
|
|
.venv/bin/pip install -U pip setuptools wheel && \
|
|
|
|
.venv/bin/pip install docopt-sh; \
|
|
|
|
fi
|
|
|
|
.venv/bin/docopt.sh abra
|
|
|
|
|
2020-10-26 17:01:12 +00:00
|
|
|
kcov:
|
|
|
|
@docker run \
|
|
|
|
-it \
|
|
|
|
--rm \
|
|
|
|
-v $$(pwd):/workdir \
|
|
|
|
kcov/kcov:latest \
|
|
|
|
kcov /workdir/coverage /workdir/abra || true
|
2020-10-25 20:41:17 +00:00
|
|
|
|
2020-10-26 17:01:12 +00:00
|
|
|
codecov: SHELL:=/bin/bash
|
|
|
|
codecov:
|
|
|
|
@bash <(curl -s https://codecov.io/bash) \
|
|
|
|
-s coverage -t $$(pass show hosts/swarm.autonomic.zone/drone/codecov/token)
|