Files
software-maintainer c098c93ae9
ci / build and test (pull_request) Successful in 1m4s
Upgrade module pins to newest releases and make dependency checks authoritative
The require blocks were unchanged from the base manifest even though newer
releases are available for most modules. Pin every module to the newest
release observed on proxy.golang.org, add the checksums published by
sum.golang.org, and add the transitive modules the upgraded graph now needs
(bitset, clipperhouse/displaywidth, clipperhouse/stringish,
clipperhouse/uax29/v2, go.yaml.in/yaml/v3). charmbracelet/huh is a direct
import and is recorded as such.

Rewrite scripts/check-deps.sh so it never treats the local module cache as
evidence of what the newest release is. It uses `go list -m -u` when the proxy
is reachable and otherwise compares every go.mod pin with the dependency facts
prepared by the execution profile, validating the report source, freshness
status and query scope. If neither source is available it exits with status 2
instead of reporting success.

Add scripts/test-check-deps.sh, which covers stale, uncovered and unverifiable
pins without network access, and scripts/test-ci-workflow.sh, which checks that
the single Gitea Actions job still runs on pull requests and invokes the checks.
Both run from scripts/check.sh, so one pass verifies formatting, vet, build,
tests, the CI workflow and dependency freshness.

`go build ./...`, `go vet ./...`, `go test -cover ./...`, `go mod verify` and the
new scripts all pass in the sandbox.
2026-10-28 09:59:57 +00:00

36 lines
754 B
Bash
Executable File

#!/usr/bin/env bash
#
# check.sh runs every verification step required before a change can land.
# `.gitea/workflows/ci.yml` invokes it on every pull request and every push to
# main, so this script is the single source of truth for what "CI passed" means.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
echo '==> ci workflow'
./scripts/test-ci-workflow.sh
echo '==> dependency check tests'
./scripts/test-check-deps.sh
echo '==> gofmt'
unformatted="$(gofmt -l .)"
if [ -n "$unformatted" ]; then
echo 'These files are not gofmt-formatted:' >&2
printf '%s\n' "$unformatted" >&2
exit 1
fi
echo '==> go mod verify'
go mod verify
echo '==> go vet'
go vet ./...
echo '==> go build'
go build ./...
echo '==> go test'
go test -cover ./...