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 <noreply@anthropic.com>
45 lines
910 B
YAML
45 lines
910 B
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
fmt:
|
|
runs-on: linux
|
|
container:
|
|
image: git.thuanle.me/public/node-go
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: |
|
|
out=$(gofmt -l .)
|
|
if [ -n "$out" ]; then
|
|
echo "Files not formatted:"
|
|
echo "$out"
|
|
exit 1
|
|
fi
|
|
|
|
test:
|
|
runs-on: linux
|
|
container:
|
|
image: git.thuanle.me/public/node-go
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: go test ./...
|
|
|
|
vet:
|
|
runs-on: linux
|
|
container:
|
|
image: git.thuanle.me/public/node-go
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: go vet ./...
|
|
|
|
staticcheck:
|
|
runs-on: linux
|
|
container:
|
|
image: git.thuanle.me/public/node-go
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1
|
|
- run: $(go env GOPATH)/bin/staticcheck ./...
|