This repository was archived by the owner on Jan 30, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +33
-12
lines changed
Expand file tree Collapse file tree 3 files changed +33
-12
lines changed Original file line number Diff line number Diff line change 1- name : Check PR
1+ name : Golang
22
33on :
4- pull_request :
5- branches :
6- - main
7- - release-*
4+ workflow_call : {}
5+ workflow_dispatch : {}
86
97jobs :
10- build :
8+ sanity :
119 runs-on : ubuntu-latest
1210 steps :
1311 - uses : actions/checkout@v4
@@ -18,25 +16,25 @@ jobs:
1816 go-version-file : go.mod
1917
2018 - name : Tidy
21- run : make tidy
19+ run : make ci. tidy
2220
2321 - name : Vet
2422 run : make vet
2523
2624 - name : Format
27- run : make fmt
25+ run : make ci. fmt
2826
29- - name : Run golangci linting checks
27+ - name : Lint
3028 run : make lint
3129
32- # - name: Test
33- # run: make cover
30+ - name : Test
31+ run : make cover
3432
3533 # - name: Coveralls
3634 # uses: coverallsapp/github-action@v2
3735 # with:
3836 # github-token: ${{ secrets.GITHUB_TOKEN }}
3937 # file: coverage.out
4038
41- - name : Build a binary
39+ - name : Build
4240 run : make build
Original file line number Diff line number Diff line change 1+ name : Pull Request
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ jobs :
9+ golang-sanity :
10+ uses : ./.github/workflows/golang.yaml
Original file line number Diff line number Diff line change @@ -65,6 +65,19 @@ fmt: install.gofumpt
6565tidy :
6666 go mod tidy
6767
68+ # ## Fail if git diff detects a change. Useful for CI.
69+ .PHONY : diff-check
70+ diff-check :
71+ git diff --exit-code
72+
73+ .PHONY : ci.fmt
74+ ci.fmt : fmt diff-check
75+ echo " => ci.fmt done"
76+
77+ .PHONY : ci.tidy
78+ ci.tidy : tidy diff-check
79+ echo " => ci.tidy done"
80+
6881# ## Installing Developer Tools
6982# gofumpt
7083GOFUMPT = $(OUT_DIR ) /gofumpt
You can’t perform that action at this time.
0 commit comments