jobs: # Fast feedback: this finishes in seconds, so it is not held behind the # suite. build: steps: - go build ./... - go vet ./... # The suite drives real git, ssh, sshd and gpg. Several tests skip # themselves when a tool is absent, so the prerequisites are asserted # first, all of them in one step so one run names everything to install. # A green check that quietly tested less is worse than a red one. # The 20m is under the runner's own 30m limit, so go times out first and # says which test hung instead of the runner killing it blind. test: steps: - missing=""; for t in git git-lfs gpg; do command -v "$t" >/dev/null || missing="$missing $t"; done; test -x /usr/sbin/sshd || missing="$missing sshd"; test -z "$missing" || { echo "runner is missing:$missing"; exit 1; } - go test ./... -count=1 -timeout 20m # Vulnerability scanning, separate from test so a newly published advisory # against unchanged code does not mask a real test failure. It fails the # build on purpose: an advisory that only lands in a report nobody reads is # the state this replaced. @latest matches deploy/audit.sh, so a run scans # against the database as it is today, not as it was at commit time. vuln: steps: - go run golang.org/x/vuln/cmd/govulncheck@latest ./...