2020-10-23 14:14:08 +03:00
|
|
|
name: coverage
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
coverage:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
go-version: [^1]
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
2022-09-26 09:13:43 +03:00
|
|
|
uses: actions/setup-go@v3
|
2020-10-23 14:14:08 +03:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Coverage
|
|
|
|
env:
|
|
|
|
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
go test -race -covermode atomic -coverprofile=profile.cov ./...
|
|
|
|
GO111MODULE=off go get github.com/mattn/goveralls
|
|
|
|
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
|