.gitbay/ci.yml

7effe3feb4612cffb5ed38c02300299559aa8971
gitbay/.gitbay/ci.yml history · blame · raw

25 lines · 1329 bytes

 1jobs:
 2  # Fast feedback: this finishes in seconds, so it is not held behind the
 3  # suite.
 4  build:
 5    steps:
 6      - go build ./...
 7      - go vet ./...
 8  # The suite drives real git, ssh, sshd and gpg. Several tests skip
 9  # themselves when a tool is absent, so the prerequisites are asserted
10  # first, all of them in one step so one run names everything to install.
11  # A green check that quietly tested less is worse than a red one.
12  # The 20m is under the runner's own 30m limit, so go times out first and
13  # says which test hung instead of the runner killing it blind.
14  test:
15    steps:
16      - 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; }
17      - go test ./... -count=1 -timeout 20m
18  # Vulnerability scanning, separate from test so a newly published advisory
19  # against unchanged code does not mask a real test failure. It fails the
20  # build on purpose: an advisory that only lands in a report nobody reads is
21  # the state this replaced. @latest matches deploy/audit.sh, so a run scans
22  # against the database as it is today, not as it was at commit time.
23  vuln:
24    steps:
25      - go run golang.org/x/vuln/cmd/govulncheck@latest ./...