From dc378484c967b9c20c3fca2dfd6e9bad6b67f75d Mon Sep 17 00:00:00 2001 From: Molecule AI SDK-Dev Date: Sun, 10 May 2026 07:49:13 +0000 Subject: [PATCH] fix(ci): add dedicated CI test workflow Adds .github/workflows/ci.yml so PRs touching Go code are validated independently of the release workflow. Previously the test job was co-located inside release.yml gated on `startsWith(github.ref, 'refs/tags/v')`, meaning no automated test ran on PRs until a tag was pushed. The new workflow mirrors the release.yml test job (go mod tidy, go vet, go test -race) and triggers on every push to main and every pull request that touches Go code, using Go 1.25 to match release.yml. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8cae493 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI / Test + +# Runs on every PR touching Go code, and on every push to main. +# Mirrors the test job from release.yml so PRs are validated independently +# of the release workflow. Uses Go 1.25 to match release.yml. + +on: + push: + branches: [main] + paths: + - '**.go' + - 'go.mod' + - 'go.sum' + - '.github/workflows/ci.yml' + pull_request: + paths: + - '**.go' + - 'go.mod' + - 'go.sum' + - '.github/workflows/ci.yml' + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.25' + cache: true + - name: Tidy + run: go mod tidy && git diff --exit-code go.sum + - name: Vet + run: go vet ./... + - name: Test + run: go test -race -count=1 ./... -- 2.52.0