Skip to content

Commit cbbbd22

Browse files
committed
feat: edit test command in makefile, add test in ci
1 parent 609e3d3 commit cbbbd22

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

.github/workflows/build-release.yml

+20
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,28 @@ on:
66
- published
77

88
jobs:
9+
test:
10+
name: Run Go Format and Test
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v4
19+
with:
20+
go-version: "1.22.6"
21+
22+
- name: Go Format
23+
run: go fmt ./...
24+
25+
- name: Run Go Tests
26+
run: go test -v ./...
27+
928
build:
1029
name: Build Go binaries
30+
needs: test
1131
runs-on: ubuntu-latest
1232

1333
strategy:

Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ $(BUILDDIR)/:
3232
install:
3333
go install -ldflags "-X github.com/initia-labs/weave/cmd.Version=$(WEAVE_VERSION)" .
3434

35-
test: build
36-
clear
37-
./weave
35+
test:
36+
go test -v ./...
3837

3938
release:
4039
@if [ -z "$(release_version)" ]; then \

0 commit comments

Comments
 (0)