Skip to content

Commit 6d81ec7

Browse files
committed
Fix CI: go.mod version and simplify workflow
- Fix go.mod to use go 1.20 (minimum tested version) - Remove benchmark job (requires special setup) - Simplify staticcheck installation
1 parent 6433318 commit 6d81ec7

2 files changed

Lines changed: 6 additions & 33 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
run: go test -v ./...
3636

3737
- name: Test with Coverage
38+
if: matrix.go-version == '1.22'
3839
run: go test -coverprofile=coverage.out ./...
3940

4041
- name: Upload Coverage
@@ -62,40 +63,12 @@ jobs:
6263
- name: Check formatting
6364
run: |
6465
if ! gofmt -d . | grep -q .; then
65-
echo "Code is properly formatted"
66-
else
6766
echo "Code needs formatting"
6867
gofmt -d .
6968
exit 1
7069
fi
7170
72-
- name: Install staticcheck
73-
run: go install honnef.co/go/tools/cmd/staticcheck@latest
74-
75-
- name: Run staticcheck
76-
run: staticcheck ./...
77-
78-
benchmark:
79-
runs-on: ubuntu-latest
80-
steps:
81-
- uses: actions/checkout@v4
82-
83-
- name: Set up Go
84-
uses: actions/setup-go@v5
85-
with:
86-
go-version: '1.22'
87-
88-
- name: Run benchmarks
89-
run: go test -bench=. -benchmem ./...
90-
91-
- name: Upload benchmark results
92-
uses: benchmark-action/github-action-benchmark@v1
93-
with:
94-
name: Go Benchmark
95-
tool: 'go'
96-
output-file-path: bench.txt
97-
github-pages: false
98-
alert-threshold: '200%'
99-
fail-on-alert: false
100-
env:
101-
BENCHMARK_FLAG: '-bench=. -benchmem'
71+
- name: Install and run staticcheck
72+
run: |
73+
go install honnef.co/go/tools/cmd/staticcheck@latest
74+
staticcheck ./...

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/oliveagle/jsonpath
22

3-
go 1.25.5
3+
go 1.20

0 commit comments

Comments
 (0)