Skip to content

Commit ba418d7

Browse files
ci(golangci-lint): update linter version to latest (v2.6.1); improve CI caching (#2431)
* chore: changelog * ci(golangci-lint): update linter version to latest (v2.6.1) * ci(golangci-lint): update linter version to latest (v2.6.1); improve CI caching
1 parent 5ff2e08 commit ba418d7

File tree

3 files changed

+11
-29
lines changed

3 files changed

+11
-29
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,37 +41,18 @@ jobs:
4141
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
4242
with:
4343
go-version: 1.24
44-
cache: false # the golangci-lint action already caches for us (https://github.com/golangci/golangci-lint-action#performance)
45-
46-
# Use GitHub actions output paramters to get go paths. For more info, see
47-
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
48-
- name: "Set output variables for go cache"
49-
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
50-
id: go-cache-paths
51-
run: |
52-
echo "go-build-cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
53-
echo "go-mod-cache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
54-
55-
- name: "Go build cache"
56-
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
57-
uses: actions/cache@v4
58-
with:
59-
path: ${{ steps.go-cache-paths.outputs.go-build-cache }}
60-
key: go-build-cache-${{ hashFiles('**/go.sum') }}
61-
62-
- name: "Go mod cache"
63-
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
64-
uses: actions/cache@v4
65-
with:
66-
path: ${{ steps.go-cache-paths.outputs.go-mod-cache }}
67-
key: go-mod-cache-${{ hashFiles('**/go.sum') }}
44+
# cache: "The action has a built-in functionality for caching and
45+
# restoring go modules and build outputs. It uses [actions/cache@v4]."
46+
# - Handles go module cache (go env GOMODCACHE).
47+
# - Handles go build cache (go env GOCACHE).
48+
cache: true # Note that golangci-lint action already caches for us (https://github.com/golangci/golangci-lint-action#performance)
6849

6950
- name: golangci-lint
7051
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
7152
uses: golangci/golangci-lint-action@v8
7253
with:
7354
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
74-
version: v2.5
55+
version: v2.6.1
7556

7657
# Optional: working directory, useful for monorepos
7758
# working-directory: somedir
@@ -83,11 +64,11 @@ jobs:
8364
# only-new-issues: true
8465

8566
# Optional: if set to true then the all caching functionality will be
86-
# complete disabled. Takes precedence over all other caching options.
67+
# completely disabled. Takes precedence over all other caching options.
8768
skip-cache: false
8869

89-
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
70+
# Optional: if set to true then the action won't cache or restore ~/go/pkg.
9071
# skip-pkg-cache: true
9172

92-
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
73+
# Optional: if set to true then the action won't cache or restore ~/.cache/go-build.
9374
# skip-build-cache: true

CHANGELOG-UNRELEASED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## Changelog Chunk
2+
* test(oracle): refactor oracle tests to not require running full blockchain networks, keeping them fast, deterministic, and stable in [#2425](https://github.com/NibiruChain/nibiru/pull/2425) - ([5ff2e08](https://github.com/NibiruChain/nibiru/commit/5ff2e0851dc241912aa9e5e636d3656720c41384)) by @Unique-Divine
23
* changelog
34
* evm: rewrite eth_estimateGas for panic safety and performance in [#2424](https://github.com/NibiruChain/nibiru/pull/2424) - ([37dba0a](https://github.com/NibiruChain/nibiru/commit/37dba0aeef545ee7a943556e1132f1aab6f6be68)) by @Unique-Divine
45
* chore: remove evm-core-ts and move it to ts-sdk in [#2423](https://github.com/NibiruChain/nibiru/pull/2423) - ([e1401f6](https://github.com/NibiruChain/nibiru/commit/e1401f69237b07d4f35f59e7de54abed2efe925b)) by @cgilbe27

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ gen-proto-openapi:
9191
lint:
9292
#!/usr/bin/env bash
9393
echo "Running golangci-lint with docker!"
94-
image_version="v2.5.0"
94+
image_version="v2.6.1"
9595
docker run --rm \
9696
-v "$(pwd)":/app \
9797
-v ~/.cache/golangci-lint/$image_version:/root/.cache \

0 commit comments

Comments
 (0)