File tree 5 files changed +1284
-5
lines changed
5 files changed +1284
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Presubmit
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - master
7
+ env :
8
+ # Default minimum version of Go to support.
9
+ DEFAULT_GO_VERSION : 1.16
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-20.04
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ with :
16
+ submodules : true
17
+ fetch-depth : 0
18
+ lfs : true
19
+
20
+ with :
21
+ go-version : ${{ env.DEFAULT_GO_VERSION }}
22
+ - name : Setup Go Environment
23
+ run : |
24
+ echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
25
+ echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
26
+ shell : bash
27
+ - name : Build and test
28
+ run : make install-tools && make presubmit
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ BUILD_X1 := -X $(BUILD_INFO_IMPORT_PATH).GitHash=$(GIT_SHA)
33
33
BUILD_X2 := -X $(BUILD_INFO_IMPORT_PATH ) .Version=$(PKG_VERSION )
34
34
LD_FLAGS := -ldflags "${BUILD_X1} ${BUILD_X2}"
35
35
36
+ TOOLS_DIR := internal/tools
37
+
36
38
.EXPORT_ALL_VARIABLES :
37
39
38
40
.DEFAULT_GOAL := presubmit
@@ -43,11 +45,11 @@ LD_FLAGS := -ldflags "${BUILD_X1} ${BUILD_X2}"
43
45
44
46
.PHONY : install-tools
45
47
install-tools :
46
- go get github.com/client9/misspell/cmd/misspell
47
- go get github.com/golangci/golangci-lint/cmd/golangci-lint
48
- go get github.com/google/addlicense
49
- go get github.com/google/googet/goopack
50
- go get github.com/pavius/impi/cmd/impi
48
+ cd $( TOOLS_DIR ) && go install github.com/client9/misspell/cmd/misspell
49
+ cd $( TOOLS_DIR ) && go install github.com/golangci/golangci-lint/cmd/golangci-lint
50
+ cd $( TOOLS_DIR ) && go install github.com/google/addlicense
51
+ cd $( TOOLS_DIR ) && go install github.com/google/googet/goopack
52
+ cd $( TOOLS_DIR ) && go install github.com/pavius/impi/cmd/impi
51
53
52
54
# --------------------------
53
55
# Helper Commands
Original file line number Diff line number Diff line change
1
+ module github.com/GoogleCloudPlatform/opentelemetry-operations-collector
2
+
3
+ go 1.16
4
+
5
+ require (
6
+ github.com/blang/semver v3.5.1+incompatible // indirect
7
+ github.com/client9/misspell v0.3.4
8
+ github.com/golangci/golangci-lint v1.42.0
9
+ github.com/google/addlicense v1.0.0
10
+ github.com/google/googet v2.13.0+incompatible
11
+ github.com/pavius/impi v0.0.3
12
+ )
You can’t perform that action at this time.
0 commit comments