Split up workflows and automatically pick latest Go version

This commit is contained in:
Christian Muehlhaeuser 2020-10-23 13:18:07 +02:00
parent a0e3bcaa61
commit 8d361ae2b7
2 changed files with 30 additions and 2 deletions

View File

@ -5,14 +5,14 @@ jobs:
build:
strategy:
matrix:
go-version: [1.12.x, 1.13.x, 1.14.x, 1.15.x]
go-version: [~1.13, ^1]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: "on"
steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

28
.github/workflows/coverage.yml vendored Normal file
View File

@ -0,0 +1,28 @@
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
uses: actions/setup-go@v2
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