check / check (push) Failing after 2s
Adds the canonical .gitignore, .dockerignore and .editorconfig; the first two also name this repo's build output, root-anchored so cmd/bsdaily/ stays in. The Dockerfile gains a lint phase on the golangci-lint image already pinned and a test phase on the Debian Go image with sqlite3 and zstd; the build stage copies a file from each, so a plain docker build cannot skip them. script/lint and script/test build their phase uncached and tagged; script/cibuild, script/docker and the CI workflow are the canonical copies. Nothing installs golangci-lint on the host. REPO_POLICIES.md is re-vendored. .golangci.yml and the lint cleanup: #6 Judgement call: .gitignore adds Go build output, per the Go styleguide. Model: opus-5-5
20 lines
593 B
Bash
Executable File
20 lines
593 B
Bash
Executable File
#!/bin/sh
|
|
# script/test: run the test suite. Testing is a phase of the Dockerfile
|
|
# and this builds that phase alone, on the same terms as script/lint:
|
|
# --target because a phase that is not the last stage is built only when
|
|
# named, --no-cache because a cached test layer is a test that did not
|
|
# run, and a tag so each build replaces the previous image.
|
|
set -eu
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
docker build --no-cache \
|
|
--target test \
|
|
-t "$("$SCRIPT_DIR/projectname")-test" .
|
|
}
|
|
|
|
main "$@"
|