Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .PHONY: all
  2. all: lint test verify
  3. .PHONY: test
  4. test: test-image
  5. docker run \
  6. --rm \
  7. --volume $(PWD)/:/home/test/sig \
  8. local/sig-test \
  9. bats sig/test/test.bats
  10. .PHONY: lint
  11. lint: test-image
  12. docker run \
  13. --rm \
  14. --interactive \
  15. --volume $(PWD)/:/home/test/sig \
  16. local/sig-test \
  17. shellcheck sig/sig
  18. .PHONY: verify
  19. verify: test-image
  20. docker run \
  21. --rm \
  22. --interactive \
  23. --volume $(PWD)/:/home/test/sig \
  24. local/sig-test /bin/bash -c " \
  25. cp -R sig /tmp/sig; \
  26. cd /tmp/sig; \
  27. ./sig fetch \
  28. --group maintainers \
  29. 6B61ECD76088748C70590D55E90A401336C8AAA9; \
  30. ./sig verify --threshold 1 --method=git --group maintainers; \
  31. ./sig verify --threshold 3 --method=detached --group maintainers; \
  32. "
  33. .PHONY: test-image
  34. test-image:
  35. docker build \
  36. --tag local/sig-test \
  37. --file $(PWD)/test/Dockerfile \
  38. $(PWD)
  39. .PHONY: test-shell
  40. test-shell: test-image
  41. docker run \
  42. --rm \
  43. --tty \
  44. --interactive \
  45. --volume $(PWD)/:/home/test/sig \
  46. local/sig-test \
  47. bash --init-file /home/test/sig/test/test_shell.bash