From 9582543c1db2745e66783f96e8abee36161a33d2 Mon Sep 17 00:00:00 2001 From: Niklas Ye Date: Fri, 31 Jul 2026 07:23:28 +0200 Subject: [PATCH] ci: gate the release on vet and tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The workflow only built and published, so a tag went straight to binaries on the releases page with nothing having run against the code first. A test job now runs go vet and go test, and build depends on it; release depends on build, so a tag that fails publishes nothing. Only runs at release time — a push or pull request is still unchecked. --- .github/workflows/release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c368bb6..4c8f300 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,26 @@ on: - 'v*' jobs: + # Gates the build, so a tag that fails here publishes no binaries. The suite + # covers the API client against a stub server, the Update state machine, and + # View rendering — all three are pure enough to test without a terminal. + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Vet + run: go vet ./... + + - name: Test + run: go test ./... + build: + needs: test runs-on: ubuntu-latest strategy: matrix: