2020-11-19 21:40:38 +00:00
|
|
|
.PHONY: test
|
2020-11-18 23:23:15 +00:00
|
|
|
test: test-image
|
|
|
|
docker run \
|
|
|
|
--rm \
|
|
|
|
--interactive \
|
2020-11-19 03:22:08 +00:00
|
|
|
--volume $(PWD)/:/home/test/sig \
|
2020-11-18 23:23:15 +00:00
|
|
|
local/sig-test \
|
2020-11-19 03:22:08 +00:00
|
|
|
bats sig/test/test.bats
|
2020-11-18 23:23:15 +00:00
|
|
|
|
2020-11-19 21:40:38 +00:00
|
|
|
.PHONY: lint
|
|
|
|
lint: test-image
|
|
|
|
docker run \
|
|
|
|
--rm \
|
|
|
|
--interactive \
|
|
|
|
--volume $(PWD)/:/home/test/sig \
|
|
|
|
local/sig-test \
|
|
|
|
shellcheck sig/sig
|
|
|
|
|
2020-11-20 09:11:09 +00:00
|
|
|
.PHONY: verify
|
|
|
|
verify: test-image
|
|
|
|
docker run \
|
|
|
|
--rm \
|
|
|
|
--interactive \
|
|
|
|
--volume $(PWD)/:/home/test/sig \
|
|
|
|
local/sig-test /bin/bash -c " \
|
|
|
|
cp -R sig /tmp/sig; \
|
|
|
|
cd /tmp/sig; \
|
|
|
|
./sig fetch --group maintainers 6B61ECD76088748C70590D55E90A401336C8AAA9; \
|
|
|
|
./sig verify --threshold 1 --method=git --group maintainers; \
|
|
|
|
./sig verify --threshold 3 --method=detached --group maintainers; \
|
|
|
|
"
|
|
|
|
|
2020-11-18 23:23:15 +00:00
|
|
|
.PHONY: test-image
|
|
|
|
test-image:
|
|
|
|
docker build \
|
|
|
|
--tag local/sig-test \
|
|
|
|
--file $(PWD)/test/Dockerfile \
|
|
|
|
$(PWD)
|
|
|
|
|
2020-11-19 21:40:38 +00:00
|
|
|
.PHONY: test-shell
|
|
|
|
test-shell: test-image
|
2020-11-18 23:23:15 +00:00
|
|
|
docker run \
|
|
|
|
--rm \
|
2020-11-20 03:51:41 +00:00
|
|
|
--tty \
|
2020-11-18 23:23:15 +00:00
|
|
|
--interactive \
|
2020-11-19 03:22:08 +00:00
|
|
|
--volume $(PWD)/:/home/test/sig \
|
2020-11-18 23:23:15 +00:00
|
|
|
local/sig-test \
|
|
|
|
bash
|