Skip to content

Commit 9b8f06b

Browse files
authored
ci: run just test (fmt + lint + race tests) instead of go test alone (#17)
The Go workflow only ran `go build` + `go test -v ./...`, missing the gofumpt fmt-check, golines length-check, and golangci-lint that `just test` runs locally. PR #11 in the meshx sibling repo landed lint failures because of the same gap; tightening this here too before it bites. Add `just` setup + `just fetch` to pull the shared osapi-justfiles, then run `just test` as the canonical pipeline. Same flow developers run locally; one source of truth. go.mod / go.sum pick up the tool-dependency entries `just test` registers (gofumpt, golines, golangci-lint, gocover-cobertura).
1 parent bea3fed commit 9b8f06b

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/go.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ jobs:
1616
uses: actions/setup-go@v6
1717
with:
1818
go-version: stable
19+
- name: Install just
20+
uses: extractions/setup-just@v4
21+
- name: Fetch shared justfiles
22+
run: just fetch
1923
- name: Build
2024
run: go build -o tlock .
21-
- name: Test
22-
run: go test -v ./...
25+
- name: Test (fmt + lint + race tests)
26+
run: just test

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ require (
4343
github.com/blizzy78/varnamelen v0.8.0 // indirect
4444
github.com/bombsimon/wsl/v4 v4.7.0 // indirect
4545
github.com/bombsimon/wsl/v5 v5.6.0 // indirect
46+
github.com/boumenot/gocover-cobertura v1.4.0 // indirect
4647
github.com/breml/bidichk v0.3.3 // indirect
4748
github.com/breml/errchkjson v0.4.1 // indirect
4849
github.com/butuzov/ireturn v0.4.0 // indirect
@@ -225,6 +226,7 @@ require (
225226
)
226227

227228
tool (
229+
github.com/boumenot/gocover-cobertura
228230
github.com/golangci/golangci-lint/v2/cmd/golangci-lint
229231
github.com/segmentio/golines
230232
mvdan.cc/gofumpt

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+j
114114
github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg=
115115
github.com/bombsimon/wsl/v5 v5.6.0 h1:4z+/sBqC5vUmSp1O0mS+czxwH9+LKXtCWtHH9rZGQL8=
116116
github.com/bombsimon/wsl/v5 v5.6.0/go.mod h1:Uqt2EfrMj2NV8UGoN1f1Y3m0NpUVCsUdrNCdet+8LvU=
117+
github.com/boumenot/gocover-cobertura v1.4.0 h1:ACJAt5wRi1HU+P9xNDgzWXgLMEVYUWeOgQWZwH+36kU=
118+
github.com/boumenot/gocover-cobertura v1.4.0/go.mod h1:Vme2O66tGa5gNpw5kwB+qzpULOnWSmnAHA5NYAOWFv8=
117119
github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE=
118120
github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE=
119121
github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg=

0 commit comments

Comments
 (0)