File tree 4 files changed +53
-0
lines changed
4 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will build a golang project
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3
+
4
+ name : Go
5
+
6
+ on :
7
+ push :
8
+ branches : [ "main" ]
9
+ pull_request :
10
+ branches : [ "main" ]
11
+
12
+ jobs :
13
+
14
+ build :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+
19
+ - name : Set up Go
20
+ uses : actions/setup-go@v5
21
+ with :
22
+ go-version : ' 1.23'
23
+
24
+ - name : Test
25
+ run : make gotest
Original file line number Diff line number Diff line change
1
+ include ./Makefile.Common
2
+
3
+ ALL_MODULES := $(shell find . -type f -name "go.mod" -exec dirname {} \; | sort | grep -E '^./' )
4
+
5
+ all-modules :
6
+ @echo $(ALL_MODULES ) | tr ' ' ' \n' | sort
7
+
8
+ # Append root module to all modules
9
+ GOMODULES = $(ALL_MODULES )
10
+
11
+ # Define a delegation target for each module
12
+ .PHONY : $(GOMODULES )
13
+ $(GOMODULES ) :
14
+ @echo " Running target '$( TARGET) ' in module '$@ '"
15
+ $(MAKE ) -C $@ $(TARGET )
16
+
17
+ .PHONY : for-all-target
18
+ for-all-target : $(GOMODULES )
19
+
20
+ .PHONY : gotest
21
+ gotest :
22
+ @$(MAKE ) for-all-target TARGET=" test"
Original file line number Diff line number Diff line change
1
+ GOCMD?= go
2
+
3
+ .PHONY: tests
4
+ test:
5
+ $(GOCMD) test ./...
Original file line number Diff line number Diff line change
1
+ include ../../Makefile.Common
You can’t perform that action at this time.
0 commit comments