fix: downgrade go version and remove hack/ folder to compatible with … #34
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 Build & Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Update go.mod | |
run: | | |
go mod edit -go=1.22 | |
go mod tidy | |
- name: Get dependencies | |
run: go mod download | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Update go.mod | |
run: | | |
go mod edit -go=1.22 | |
go mod tidy | |
- name: Install golangci-lint | |
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8 | |
- name: Run golangci-lint | |
run: golangci-lint run --timeout=5m |