From 48fcb4b0c9621b1c4f2a6c1ba57d8a8a25ce8ef6 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 30 Aug 2020 01:47:07 +0200 Subject: [PATCH] Fix build workflow --- .github/workflows/build.yml | 45 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 330087e..da8fa41 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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'