summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/go.yml34
1 files changed, 27 insertions, 7 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 8d3c1b8..927b2d5 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -8,16 +8,21 @@ on:
jobs:
- build:
- name: Build
+ build_and_test:
+ name: Build and test
runs-on: ubuntu-latest
- steps:
- - name: Set up Go 1.13
+ strategy:
+ fail-fast: false
+ matrix:
+ go: ['1.11', '1.12', '1.13', '1.14']
+
+ steps:
+ - id: go
+ name: Set up Go
uses: actions/setup-go@v1
with:
- go-version: 1.13
- id: go
+ go-version: 1.13 # ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
@@ -26,4 +31,19 @@ jobs:
run: go build -v .
- name: Test
- run: go test -v .
+ run: go test -v -coverprofile=profile.cov .
+
+ - name: Send coverage
+ uses: shogo82148/actions-goveralls@v1
+ with:
+ path-to-profile: profile.cov
+ parallel: true
+
+ # notifies coveralls that all test jobs are finished
+ finish:
+ needs: test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: shogo82148/actions-goveralls@v1
+ with:
+ parallel-finished: true \ No newline at end of file