diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 497e0eaf..601080c6 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -38,6 +38,13 @@ jobs: - name: Build run: make build + # Fails the build on the silent-failure classes listed in + # tools/checksilent, one of which is the contract boundary: nothing under + # common/ may import app/. A boundary that is only written down erodes; this + # is what keeps it true. + - name: Silent-failure checks + run: make checksilent + - name: Set up Docker Buildx uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 if: startsWith(github.ref, 'refs/tags/') diff --git a/Makefile b/Makefile index 65b32832..d668f672 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,20 @@ stop: test: go test -race -cover ./... +# Reports the failures that do not announce themselves - see +# tools/checksilent. Exits non-zero on an ERROR; the one WARN-level check +# prints and does not fail the build. +# +# Pass UI_DIR to enable the cross-repository menu-name check, which is skipped +# without it: make checksilent UI_DIR=../go-admin-ui/src +.PHONY: checksilent +checksilent: +ifdef UI_DIR + go run ./tools/checksilent -ui-dir $(UI_DIR) +else + go run ./tools/checksilent +endif + #.PHONY: docker #docker: # docker build . -t go-admin:latest