Add help command and debugging steps to CI workflows #18
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: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Create empty go.sum if it doesn't exist | |
| run: touch go.sum | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '1.21.x' | |
| check-latest: true | |
| cache: false # Disable cache to avoid issues | |
| - name: Display Go version | |
| run: go version | |
| - name: Build | |
| run: go build -v -o stremax ./cmd/stremax | |
| - name: Test | |
| run: go test -v ./... | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Create empty go.sum if it doesn't exist | |
| run: touch go.sum | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: '1.21.x' | |
| check-latest: true | |
| cache: false # Disable cache to avoid issues | |
| - name: Display Go version | |
| run: go version | |
| - name: Install golint | |
| run: go install golang.org/x/lint/golint@latest | |
| - name: Lint | |
| run: $(go env GOPATH)/bin/golint -set_exit_status ./... | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Format check | |
| run: | | |
| if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then | |
| gofmt -d . | |
| exit 1 | |
| fi |