From c08ae01d0a6481f2e2f0d53a18f0ba5b2081b106 Mon Sep 17 00:00:00 2001 From: thuanle Date: Tue, 28 Apr 2026 11:12:29 +0700 Subject: [PATCH] ci: use node-go image instead of setup-go to reduce CI time Switch all CI jobs (fmt, test, vet, staticcheck) to use the pre-built git.thuanle.me/public/node-go container image, removing the dynamic Go setup step from each job. Closes #11 Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/ci.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 246b67d..8194404 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -6,11 +6,10 @@ on: jobs: fmt: runs-on: linux + container: + image: git.thuanle.me/public/node-go steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - run: | out=$(gofmt -l .) if [ -n "$out" ]; then @@ -21,28 +20,25 @@ jobs: test: runs-on: linux + container: + image: git.thuanle.me/public/node-go steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - run: go test ./... vet: runs-on: linux + container: + image: git.thuanle.me/public/node-go steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - run: go vet ./... staticcheck: runs-on: linux + container: + image: git.thuanle.me/public/node-go steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1 - run: $(go env GOPATH)/bin/staticcheck ./...