Skip to content

gofumpt

gofumpt #97

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.22', '1.23']
steps:
- uses: actions/checkout@v4
- name: Using Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Lint
if: ${{ matrix.go-version == '1.23' && matrix.os == 'ubuntu-latest' }}
uses: golangci/golangci-lint-action@v6
- name: Test
run: go test -v -race ./... -covermode atomic -coverprofile coverage.out
- name: Upload coverage to Codecov
if: ${{ matrix.go-version == '1.23' && matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}