Skip to content

feat: port codeiq from Java/Spring Boot to Go single-binary (Phases 1-4) #4

feat: port codeiq from Java/Spring Boot to Go single-binary (Phases 1-4)

feat: port codeiq from Java/Spring Boot to Go single-binary (Phases 1-4) #4

Workflow file for this run

name: go-ci
on:
push:
branches: [main]
paths: ['go/**', '.github/workflows/go-ci.yml']
pull_request:
branches: [main]
paths: ['go/**', '.github/workflows/go-ci.yml']
permissions:
contents: read
jobs:
go:
name: vet / test / staticcheck / gosec / govulncheck
runs-on: ubuntu-latest
env:
CGO_ENABLED: "1"
defaults:
run:
working-directory: go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
cache-dependency-path: go/go.sum
- name: Install C toolchain
run: sudo apt-get update -y && sudo apt-get install -y build-essential
- name: go vet
run: go vet ./...
- name: go test (race)
run: go test ./... -race -count=1
- name: staticcheck
run: |
# staticcheck must understand the Go toolchain version that built
# the binaries above. 2024.1.1 errors with "internal error in
# importing internal/byteorder (unsupported version: 2)" against
# Go 1.25's stdlib. 2025.1.1 is the first release that handles it.
go install honnef.co/go/tools/cmd/staticcheck@2025.1.1
"$(go env GOPATH)/bin/staticcheck" ./...
- name: gosec
run: |
go install github.com/securego/gosec/v2/cmd/gosec@v2.21.4
"$(go env GOPATH)/bin/gosec" -quiet ./...
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
"$(go env GOPATH)/bin/govulncheck" ./...