From 9f6bb3563d7a311a7e5628d18210c2c263af962d Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Thu, 7 Jan 2021 13:57:35 -0700 Subject: CI: smoke test: insist on adding tests on PRs On each PR (with a few exceptions), check the list of git-touched files, and abort if no tests are added. Include instructions on how to bypass the check if tests really aren't needed. Include a hardcoded exception list for PRs that only touch a well-known subset of "safe" files: docs, .cirrus.yml, vendor, version, hack, contrib, or *.md. This list is likely to need tuning over time. Add a test suite, but not one recognized by the new script (because it's a "*.t" file), so: [NO TESTS NEEDED] Signed-off-by: Ed Santiago --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 864efa03e..1083d0a95 100644 --- a/Makefile +++ b/Makefile @@ -407,6 +407,10 @@ man-page-check: swagger-check: hack/swagger-check +.PHONY: tests-included +tests-included: + contrib/cirrus/pr-should-include-tests + .PHONY: codespell codespell: codespell -S bin,vendor,.git,go.sum,changelog.txt,.cirrus.yml,"RELEASE_NOTES.md,*.xz,*.gz,*.tar,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L uint,iff,od,seeked,splitted,marge,ERRO,hist -w @@ -644,7 +648,7 @@ validate.completions: if [ -x /bin/fish ]; then /bin/fish completions/fish/podman.fish; fi .PHONY: validate -validate: gofmt lint .gitvalidation validate.completions man-page-check swagger-check +validate: gofmt lint .gitvalidation validate.completions man-page-check swagger-check tests-included .PHONY: build-all-new-commits build-all-new-commits: -- cgit v1.2.3-54-g00ecf