Skip to content

Updaded Go github action #256

Updaded Go github action

Updaded Go github action #256

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.20.x', '1.21.x']
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
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.20') && 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