Skip to content

Commit d3a8990

Browse files
run unit tests on GitHub Actions
1 parent 409be37 commit d3a8990

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
on: [ push, pull_request ]
2+
3+
jobs:
4+
unit:
5+
strategy:
6+
matrix:
7+
go: [ "1.14", "1.15" ]
8+
runs-on: ubuntu-latest
9+
name: Unit tests (Go ${{ matrix.go }})
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-go@v2
13+
with:
14+
go-version: ${{ matrix.go }}
15+
- run: go version
16+
- name: Install test tools
17+
run: |
18+
go get golang.org/x/tools/cmd/cover
19+
go get github.com/onsi/ginkgo/ginkgo
20+
go get github.com/onsi/gomega
21+
- name: Install dependencies
22+
run: go build
23+
- name: Run tests
24+
run: ginkgo -r -v -cover -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests
25+
- name: Run tests (32 bit)
26+
env:
27+
GOARCH: 386
28+
run: ginkgo -r -v -cover -coverprofile coverage.txt -outputdir . -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests
29+
- name: Run tests with race detector
30+
run: ginkgo -r -v -race -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests
31+
- name: Upload coverage to Codecov
32+
uses: codecov/codecov-action@v1
33+
with:
34+
file: coverage.txt
35+
env_vars: GO=${{ matrix.go }}
36+

0 commit comments

Comments
 (0)