Skip to content

Go

Go #325

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 12 * * 0'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.22.x', '1.23.x']
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install errcheck
run: go install github.com/kisielk/errcheck@latest
- name: errcheck
run: errcheck -verbose ./...
- name: gofmt check
run: diff <(gofmt -d .) <(echo -n "")
- name: Test
run: go test -race -v ./...
- name: Coveralls
if: ${{ startsWith(matrix.go, '1.23') && github.event_name == 'push' }}
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go install github.com/mattn/goveralls@latest && \
go test -covermode=count -coverprofile=profile.cov ./... && \
goveralls -coverprofile=profile.cov -service=github