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 name: build
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
test: build:
strategy: strategy:
matrix: matrix:
go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x] 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" COLORFGBG: "7;0"
TERM: "xterm-256color" TERM: "xterm-256color"
steps: steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Install Go - name: Checkout code
uses: actions/setup-go@v1 uses: actions/checkout@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code - name: Download Go modules
uses: actions/checkout@v1 run: go mod download
- name: Download Go modules - name: Build
run: go mod download run: go build -v ./...
- name: Build - name: Test
run: go build -v ./... run: go test ./...
if: matrix.os != 'windows-latest'
- name: Test - name: Coverage
run: go test ./... env:
if: matrix.platform != 'windows-latest' COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- name: Coverage go test -race -covermode atomic -coverprofile=profile.cov ./...
env: GO111MODULE=off go get github.com/mattn/goveralls
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} $(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
run: | if: matrix.go-version == '1.15.x' && matrix.os == 'ubuntu-latest'
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'