-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 885 Bytes
/
go-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: go-test
on:
push:
tags:
- v*
branches-ignore:
- 'doc-**'
- 'doc/**'
- 'ci-**'
- 'ci/**'
paths:
- '**.go'
pull_request:
branches:
- main
- master
- release
paths:
- '**.go'
jobs:
go-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: ^1.18
- uses: actions/checkout@v2
- name: go-test
run: |
go test -v -count=1 \
-covermode=count \
-coverpkg=github.com/tunabay/go-tdma \
-coverprofile=cover.out \
./...
go tool cover -func=cover.out
go tool cover -html=cover.out -o go-test-coverage.html
- uses: actions/upload-artifact@v2
with:
path: go-test-coverage.html
retention-days: 3