Run lint and tests as phases of the Dockerfile (closes #5)
check / check (push) Successful in 2m45s
check / check (push) Successful in 2m45s
The Dockerfile gets a lint phase on the pinned golangci-lint v2.12.2 image and a test phase on the Debian Go image. The tests run as an unprivileged user, because root reads a file with mode 0000 and the permission test then fails. The build stage copies a file from each phase, so no build finishes unless both pass, and it no longer runs make check. script/lint and script/test each build their phase, uncached and tagged; script/cibuild bootstraps, runs script/check, then builds the image. script/bootstrap no longer installs golangci-lint. README.md and TODO.md describe the new setup. Model: opus-5-5
This commit was merged in pull request #18.
This commit is contained in:
+3
-1
@@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
# script/check: run all checks (test, lint, fmt-check). Our own
|
||||
# extension to scripts-to-rule-them-all. Must not modify any files.
|
||||
# extension to scripts-to-rule-them-all. test and lint are Docker
|
||||
# phases; fmt-check is native, because a formatter writes the working
|
||||
# tree. Must not modify any files.
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
||||
|
||||
Reference in New Issue
Block a user