Fix build workflow

This commit is contained in:
Christian Muehlhaeuser
2020-08-30 01:47:07 +02:00
parent 6c0e29c4da
commit 48fcb4b0c9
+22 -23
View File
@@ -1,7 +1,7 @@
name: build
on: [push, pull_request]
jobs:
test:
build:
strategy:
matrix:
go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x]
@@ -13,30 +13,29 @@ jobs:
COLORFGBG: "7;0"
TERM: "xterm-256color"
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v1
- name: Checkout code
uses: actions/checkout@v1
- name: Download Go modules
run: go mod download
- name: Download Go modules
run: go mod download
- name: Build
run: go build -v ./...
- name: Build
run: go build -v ./...
- name: Test
run: go test ./...
if: matrix.os != 'windows-latest'
- name: Test
run: go test ./...
if: matrix.platform != 'windows-latest'
- 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
if: matrix.go-version == '1.14.x' && matrix.platform == 'ubuntu-latest'
- 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
if: matrix.go-version == '1.15.x' && matrix.os == 'ubuntu-latest'