-
Notifications
You must be signed in to change notification settings - Fork 0
V2026 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2026 #9
Changes from all commits
f1268d3
49b2cc1
33ba222
6e4d859
76bc7cc
2da4883
333bc94
7f5d93c
5f0c6f2
9bbfff3
533bef2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| push: | ||
| branches: [main, master] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test-and-lint: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| go-version: ['1.24.x', '1.25.x'] | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: ${{ matrix.go-version }} | ||
| cache: true | ||
|
|
||
| - name: Verify module graph | ||
| if: matrix.go-version == '1.23.x' | ||
| run: | | ||
| go mod tidy | ||
| git diff --exit-code -- go.mod go.sum | ||
|
|
||
|
Comment on lines
+36
to
+41
|
||
| - name: Format check | ||
| run: | | ||
| unformatted=$(gofmt -l $(git ls-files '*.go')) | ||
| if [ -n "$unformatted" ]; then | ||
| echo "These files are not gofmt-formatted:" | ||
| echo "$unformatted" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Vet | ||
| run: go vet ./... | ||
|
|
||
| - name: Staticcheck | ||
| if: matrix.go-version == '1.23.x' | ||
| run: | | ||
| go install honnef.co/go/tools/cmd/staticcheck@v0.6.1 | ||
| TOOLBIN="$(go env GOBIN)" | ||
| if [ -z "$TOOLBIN" ]; then | ||
| TOOLBIN="$(go env GOPATH)/bin" | ||
| fi | ||
| "$TOOLBIN/staticcheck" ./... | ||
|
|
||
|
Comment on lines
+54
to
+63
|
||
| - name: Unit tests | ||
| run: go test ./... | ||
|
|
||
| - name: Race tests | ||
| run: go test -race ./... | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,91 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||
| name: Publish | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||
| release: | ||||||||||||||||||||||||||||||||||||||||||||||||
| types: [published] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||
| publish-go-module: | ||||||||||||||||||||||||||||||||||||||||||||||||
| if: github.event.release.prerelease == false | ||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||
| timeout-minutes: 10 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout release tag | ||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||
| ref: refs/tags/${{ github.event.release.tag_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Setup Go | ||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||
| go-version: '1.24.x' | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Validate release tag format and VERSION match | ||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||
| TAG="${{ github.event.release.tag_name }}" | ||||||||||||||||||||||||||||||||||||||||||||||||
| case "$TAG" in | ||||||||||||||||||||||||||||||||||||||||||||||||
| v*) ;; | ||||||||||||||||||||||||||||||||||||||||||||||||
| *) | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Release tag must start with 'v' (got: $TAG)" | ||||||||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||||||||||||||||||||||||||
| esac | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| TAG_NO_V="${TAG#v}" | ||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION_FILE=$(tr -d '[:space:]' < VERSION) | ||||||||||||||||||||||||||||||||||||||||||||||||
| if ! test "$TAG_NO_V" = "$VERSION_FILE"; then | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Release tag version does not match VERSION file" | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo " tag version (without 'v'): $TAG_NO_V" | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo " VERSION file: $VERSION_FILE" | ||||||||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Verify release tag is on main | ||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||||||||||||||||||||||
| git fetch origin main:refs/remotes/origin/main | ||||||||||||||||||||||||||||||||||||||||||||||||
| MAIN_SHA=$(git rev-parse origin/main) | ||||||||||||||||||||||||||||||||||||||||||||||||
| if ! test "${GITHUB_SHA}" = "${MAIN_SHA}"; then | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Release tag is not at main HEAD; refusing to publish" | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo " tag: ${{ github.event.release.tag_name }}" | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo " tag sha: ${GITHUB_SHA}" | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo " main head: ${MAIN_SHA}" | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+48
to
+57
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Verify release tag is on main | |
| run: | | |
| set -euo pipefail | |
| git fetch origin main:refs/remotes/origin/main | |
| MAIN_SHA=$(git rev-parse origin/main) | |
| if ! test "${GITHUB_SHA}" = "${MAIN_SHA}"; then | |
| echo "Release tag is not at main HEAD; refusing to publish" | |
| echo " tag: ${{ github.event.release.tag_name }}" | |
| echo " tag sha: ${GITHUB_SHA}" | |
| echo " main head: ${MAIN_SHA}" | |
| - name: Verify release tag is on default branch | |
| env: | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| run: | | |
| set -euo pipefail | |
| git fetch origin "${DEFAULT_BRANCH}:refs/remotes/origin/${DEFAULT_BRANCH}" | |
| DEFAULT_BRANCH_SHA=$(git rev-parse "origin/${DEFAULT_BRANCH}") | |
| if ! test "${GITHUB_SHA}" = "${DEFAULT_BRANCH_SHA}"; then | |
| echo "Release tag is not at default branch HEAD; refusing to publish" | |
| echo " tag: ${{ github.event.release.tag_name }}" | |
| echo " tag sha: ${GITHUB_SHA}" | |
| echo " default branch: ${DEFAULT_BRANCH}" | |
| echo " default branch head: ${DEFAULT_BRANCH_SHA}" |
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||
| # Changelog | ||||||
|
|
||||||
| All notable changes to this project are documented in this file. | ||||||
|
|
||||||
| ## [1.3.0] - 2026-02-10 | ||||||
|
|
||||||
| ### Added | ||||||
| - Added GitHub Actions CI workflow for pull requests and default-branch pushes with module, formatting, vet, static analysis, test, and race checks. | ||||||
| - Added GitHub Actions publish workflow driven by GitHub Release publication to trigger Go proxy and pkg.go.dev indexing. | ||||||
|
|
||||||
| ### Changed | ||||||
| - Removed legacy Travis CI configuration in favor of GitHub Actions. | ||||||
| - Hardened CI reliability by adding workflow concurrency cancellation, running module/static checks on the primary Go version, and pinning staticcheck. | ||||||
|
||||||
| - Hardened CI reliability by adding workflow concurrency cancellation, running module/static checks on the primary Go version, and pinning staticcheck. | |
| - Hardened CI reliability by adding workflow concurrency cancellation and initial configuration for module/static checks on the primary Go version with a pinned staticcheck version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
.github/workflows/ci.yml, the job matrix only runs1.24.xand1.25.x, but this step (and theStaticcheckstep below) is guarded byif: matrix.go-version == '1.23.x', which can never match. As a result, module graph verification and static analysis are silently skipped on every CI run, so dependency drift and staticcheck-detectable regressions can merge without detection.Useful? React with 👍 / 👎.