File tree Expand file tree Collapse file tree 6 files changed +321
-0
lines changed Expand file tree Collapse file tree 6 files changed +321
-0
lines changed Original file line number Diff line number Diff line change 29
29
- name : Install dependencies
30
30
if : steps.module-cache.outputs.cache-hit != 'true'
31
31
run : make gomoddownload
32
+ - name : Cache Tools
33
+ id : tool-cache
34
+ uses : actions/cache@v3
35
+ with :
36
+ path : /home/runner/go/bin
37
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
38
+ - name : Install Tools
39
+ if : steps.tool-cache.outputs.cache-hit != 'true'
40
+ run : make install-tools
41
+
32
42
build-and-test :
33
43
runs-on : ubuntu-latest
34
44
needs : [setup-environment]
56
66
key : go-build-unittest-${{ runner.os }}-${{ hashFiles('**/go.mod', '**/go.sum') }}
57
67
- name : Build and Test
58
68
run : make
69
+
70
+ test-coverage :
71
+ runs-on : ubuntu-latest
72
+ needs : [setup-environment]
73
+ steps :
74
+ - name : Checkout Repo
75
+ uses : actions/checkout@v3
76
+ - name : Setup Go
77
+ uses : actions/setup-go@v3
78
+ with :
79
+ go-version : 1.17
80
+ - name : Setup Go Environment
81
+ run : |
82
+ echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
83
+ echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
84
+ - name : Cache Go
85
+ id : module-cache
86
+ uses : actions/cache@v3
87
+ with :
88
+ path : /home/runner/go/pkg/mod
89
+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
90
+ - name : Cache Tools
91
+ id : tool-cache
92
+ uses : actions/cache@v3
93
+ with :
94
+ path : /home/runner/go/bin
95
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
96
+ - name : Cache Build
97
+ uses : actions/cache@v3
98
+ with :
99
+ path : /home/runner/.cache/go-build
100
+ key : go-build-coverage-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
101
+ - name : Run Unit Tests With Coverage
102
+ run : make test-with-cover
103
+ - name : Upload coverage report
104
+ uses : codecov/codecov-action@v3
105
+ with :
106
+ file : ./coverage.out
107
+ fail_ci_if_error : true
108
+ verbose : true
Original file line number Diff line number Diff line change
1
+ package tools
Original file line number Diff line number Diff line change
1
+ module github.com/open-telemetry/opamp-go/internal/tools
2
+
3
+ go 1.17
4
+
5
+ require github.com/ory/go-acc v0.2.8
6
+
7
+ require (
8
+ github.com/cespare/xxhash v1.1.0 // indirect
9
+ github.com/dgraph-io/ristretto v0.0.2 // indirect
10
+ github.com/fsnotify/fsnotify v1.4.9 // indirect
11
+ github.com/google/uuid v1.1.1 // indirect
12
+ github.com/hashicorp/hcl v1.0.0 // indirect
13
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
14
+ github.com/magiconair/properties v1.8.1 // indirect
15
+ github.com/mitchellh/mapstructure v1.3.2 // indirect
16
+ github.com/ory/viper v1.7.5 // indirect
17
+ github.com/pborman/uuid v1.2.0 // indirect
18
+ github.com/pelletier/go-toml v1.8.0 // indirect
19
+ github.com/spf13/afero v1.2.2 // indirect
20
+ github.com/spf13/cast v1.3.1 // indirect
21
+ github.com/spf13/cobra v1.0.0 // indirect
22
+ github.com/spf13/jwalterweatherman v1.1.0 // indirect
23
+ github.com/spf13/pflag v1.0.5 // indirect
24
+ github.com/subosito/gotenv v1.2.0 // indirect
25
+ golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
26
+ golang.org/x/text v0.3.2 // indirect
27
+ gopkg.in/ini.v1 v1.57.0 // indirect
28
+ gopkg.in/yaml.v2 v2.3.0 // indirect
29
+ )
You can’t perform that action at this time.
0 commit comments