#!/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 ./...