summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2020-04-03 12:31:52 -0400
committerGitHub <[email protected]>2020-04-03 12:31:52 -0400
commit854aa644a6897022cab3dc5974bc19f0367f9055 (patch)
tree2bb7c6c26860731a87f65ade08a84017ac2350e9 /.github
parent6f3675fdf12421b56abafbc514ba723e6e4d696d (diff)
parent1fc1a6f6dfb7a332ea90974acd09dadcdf2c2b11 (diff)
Merge pull request #110 from alexflint/github-actions
Set up CI using github actions
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/go.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
new file mode 100644
index 0000000..4be256c
--- /dev/null
+++ b/.github/workflows/go.yml
@@ -0,0 +1,50 @@
+name: Go
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+
+ build_and_test:
+ name: Build and test
+ runs-on: ubuntu-latest
+
+ 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: ${{ matrix.go }}
+
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@v2
+
+ - name: Build
+ run: go build -v .
+
+ - name: Test
+ 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:
+ name: Finish
+ needs: build_and_test
+ runs-on: ubuntu-latest
+ steps:
+ - uses: shogo82148/actions-goveralls@v1
+ with:
+ parallel-finished: true