Skip to content

github/workflows: add go v1.22 build, bump setup-go and cache #13

github/workflows: add go v1.22 build, bump setup-go and cache

github/workflows: add go v1.22 build, bump setup-go and cache #13

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.20', '1.21', '1.22']
steps:
- name: Cache go deps
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashfiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
env:
GOFLAGS: -mod=mod
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -cover ./...