Skip to content

Commit 8f19263

Browse files
authored
Add basic GitHub Action for running unit tests + code coverage (#1666)
* Add basic GitHub Action for running unit tests + code coverage * Bump go version * Remove some extra blank lines
1 parent 72cef4c commit 8f19263

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/test.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Unit Test
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Set up Go 1.x
13+
uses: actions/setup-go@v2
14+
with:
15+
go-version: ^1.15
16+
17+
- name: Check out code into the Go module directory
18+
uses: actions/checkout@v2
19+
20+
- name: Run unit tests
21+
run: |
22+
sudo snap install yq
23+
make test
24+
25+
- name: Codecov
26+
uses: codecov/codecov-action@v1
27+
with:
28+
file: ./cover.out # optional

0 commit comments

Comments
 (0)