Use go 1.22 on CI #4
This file contains 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@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
go-version-file: 'go.mod' | |
- name: Build | |
run: | | |
go generate | |
GOOS=darwin CGO_ENABLED=0 GOARCH=amd64 go build main.go | |
GOOS=darwin CGO_ENABLED=0 GOARCH=arm64 go build main.go | |
GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build main.go | |
GOOS=linux CGO_ENABLED=0 GOARCH=arm64 go build main.go | |
- name: Test | |
run: go test -v ./... |