From 9d6d2c61c35c3ac57dab95b57796226b5fc59708 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Sat, 7 Feb 2026 20:01:01 -0500 Subject: [PATCH] Add Gitea CI workflow for build, test, vet, and lint Runs on all pushes and PRs: - Build, vet, and test both root and v2 modules (with -race) - Verify go.mod/go.sum tidiness for both modules Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/ci.yaml | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .gitea/workflows/ci.yaml diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..6642320 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,76 @@ +name: CI + +on: + push: + branches: ["*"] + pull_request: + branches: ["*"] + +jobs: + root-module: + name: Root Module + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + + - name: Download dependencies + run: go mod download + + - name: Build + run: go build ./... + + - name: Vet + run: go vet ./... + + - name: Test + run: go test -race -count=1 ./... + + v2-module: + name: V2 Module + runs-on: ubuntu-latest + defaults: + run: + working-directory: v2 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + + - name: Download dependencies + run: go mod download + + - name: Build + run: go build ./... + + - name: Vet + run: go vet ./... + + - name: Test + run: go test -race -count=1 ./... + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: "1.24" + + - name: Check root module tidiness + run: | + go mod tidy + git diff --exit-code go.mod go.sum + + - name: Check v2 module tidiness + run: | + cd v2 + go mod tidy + git diff --exit-code go.mod go.sum