-
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 989 Bytes
/
go.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
41
42
43
name: Go
on:
pull_request:
branches: [ main, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# default fetch-depth is insufficent to find previous coverage notes
fetch-depth: 10
- uses: gwatts/go-coverage-action@v1
id: coverage
with:
# Optional coverage threshold
# use fail-coverage to determine what should happen below this threshold
coverage-threshold: 80
# collect coverage for all packages beyond the one under test
cover-pkg: ./...
# Ignore code-generated files when calculating coverage totals
ignore-pattern: |
\.pb\.go$
\_string\.go$