.github/workflows/actions.yml
name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '10 10 * * 0'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go: [ 'stable', 'oldstable' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
cache: true
- run: go test -race -covermode=atomic -coverprofile=coverage.txt ./...
- uses: codecov/codecov-action@v3