Skip to content

Commit b370a60

Browse files
committed
Added CI workflow
1 parent 0430fee commit b370a60

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/test.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test-matrix:
9+
strategy:
10+
matrix:
11+
operating-system:
12+
[
13+
ubuntu-latest,
14+
ubuntu-18.04,
15+
windows-latest,
16+
windows-2016,
17+
macos-latest,
18+
]
19+
20+
runs-on: ${{ matrix.operating-system }}
21+
22+
steps:
23+
- name: Disable EOL conversions
24+
run: git config --global core.autocrlf false
25+
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
29+
- name: Install Go
30+
uses: actions/setup-go@v2
31+
with:
32+
go-version: "1.16"
33+
34+
- name: Run unit tests
35+
run: go test -v ./... -coverprofile=coverage_unit.txt
36+
37+
- name: Send unit tests coverage to Codecov
38+
if: >
39+
matrix.operating-system == 'ubuntu-latest' &&
40+
github.event_name == 'push'
41+
uses: codecov/codecov-action@v1
42+
with:
43+
file: ./coverage_unit.txt
44+
flags: unit

0 commit comments

Comments
 (0)