Skip to content

Commit d4dbac9

Browse files
committed
Add CI
1 parent 39cf8e7 commit d4dbac9

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.github/workflows/pr.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
arch: [ linux/amd64, linux/arm64 ]
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v4
15+
- name: Setup Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '>=1.21.0'
19+
- name: Go Format
20+
run: make fmt && git diff --exit-code
21+
- name: Go Vet
22+
run: make vet
23+
- name: Go Tidy
24+
run: go mod tidy && git diff --exit-code
25+
- name: Go Mod
26+
run: go mod download
27+
- name: Go Mod Verify
28+
run: go mod verify
29+
- name: Go Build
30+
run: make build
31+
- name: Go Build
32+
run: make test
33+
34+
35+
36+
37+

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ integration:
2626
RUN_INTEGRATION_TESTS=true go test -v ./...
2727
.PHONY: integration
2828

29+
vet:
30+
go vet ./...
31+
.PHONY: vet
32+
2933
fmt:
3034
gofmt -s -w .
3135
.PHONY: fmt
3236

33-
check: fmt clean build build-docker lint test integration
37+
check: fmt vet clean build build-docker lint test integration
3438
.PHONY: check
3539

3640
lint:

0 commit comments

Comments
 (0)