File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - " master"
7+ pull_request :
8+ branches :
9+ - " *"
10+
11+ defaults :
12+ run :
13+ shell : bash
14+
15+ env :
16+ # go needs absolute directories, using the $HOME variable doesn't work here.
17+ GOCACHE : /home/runner/work/go/pkg/build
18+ GOPATH : /home/runner/work/go
19+ GO_VERSION : 1.22.3
20+
21+ jobs :
22+ # #######################
23+ # run unit tests
24+ # #######################
25+ unit-test :
26+ name : run unit tests
27+ runs-on : ubuntu-latest
28+ steps :
29+ - name : git checkout
30+ uses : actions/checkout@v3
31+
32+ - name : go cache
33+ uses : actions/cache@v3
34+ with :
35+ path : /home/runner/work/go
36+ key : btclog-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
37+ restore-keys : |
38+ btclog-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
39+ btclog-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
40+ btclog-${{ runner.os }}-go-${{ env.GO_VERSION }}-
41+ btclog-${{ runner.os }}-go-
42+
43+ - name : setup go ${{ env.GO_VERSION }}
44+ uses : actions/setup-go@v3
45+ with :
46+ go-version : ' ~${{ env.GO_VERSION }}'
47+
48+ - name : run unit tests
49+ run : make unit
Original file line number Diff line number Diff line change 1+ PKG := github.com/lightninglabs/btclog
2+
3+ GOLIST := go list -deps $(PKG ) /... | grep '$(PKG ) '| grep -v '/vendor/'
4+ GOTEST := go test -v
5+
6+ XARGS := xargs -L 1
7+ UNIT := $(GOLIST ) | $(XARGS ) env $(GOTEST ) $(TEST_FLAGS )
8+
9+ unit :
10+ @$(call print, "Running unit tests.")
11+ $(UNIT )
You can’t perform that action at this time.
0 commit comments