Skip to content

Update Go versions. (#8) #60

Update Go versions. (#8)

Update Go versions. (#8) #60

name: build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# last 2 major versions are supported
# https://go.dev/doc/devel/release#policy
go-version: ['1.21', '1.22']
steps:
- uses: actions/checkout@v3
- name: Using Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -race ./... -covermode atomic -coverprofile coverage.out
- name: Upload coverage to Codecov
if: ${{ matrix.go-version == '1.20' && matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v3