Golang port #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install System Dependencies | |
| run: | | |
| apt-get update && apt-get install -y jq make | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25.7' | |
| cache-dependency-path: golang/go.sum | |
| - name: Check Formatting | |
| run: | | |
| if [ -n "$(gofmt -l .)" ]; then | |
| echo "Go code is not formatted:" | |
| gofmt -d . | |
| exit 1 | |
| fi | |
| working-directory: ./golang | |
| - name: GolangCI-Lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest | |
| working-directory: ./golang | |
| env: | |
| GOFLAGS: "-buildvcs=false" | |
| - name: Run Gosec Security Scanner | |
| uses: securego/gosec@master | |
| with: | |
| args: ./golang/... | |
| env: | |
| GOTOOLCHAIN: auto | |
| - name: Run govulncheck | |
| run: | | |
| go install golang.org/x/vuln/cmd/govulncheck@latest | |
| govulncheck ./... | |
| working-directory: ./golang | |
| - name: Build | |
| run: make build | |
| working-directory: ./golang | |
| - name: Test | |
| run: go test -v -coverprofile=coverage.out ./... | |
| working-directory: ./golang | |
| - name: Run Integration Test | |
| run: bash ./test-dummy.sh |