Skip to content

Commit 17b907a

Browse files
committed
chore(make): add test target
1 parent 35e214f commit 17b907a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/pr.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515

1616
- name: Run unit tests
1717
run: |
18-
pwd && ls -ltr && go version && go test ./... -cover
18+
pwd && ls -ltr && go version && make test

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Run unit tests
5454
run: |
55-
go test ./... -cover
55+
make test
5656
5757
- name: GoReleaser
5858
uses: goreleaser/[email protected]

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
.PHONY: lambda
2-
32
lambda:
43
mkdir -p functions
54
CGO_ENABLED=0 GOOS=linux go build --ldflags "-s -w" -o functions/github-action-webhook cmd/webhook/main.go
65

7-
all: lambda
6+
all: lambda
7+
8+
.PHONY: test
9+
test:
10+
go test ./... -cover

0 commit comments

Comments
 (0)