fix(ci): install golangci-lint manually and remove version field
The golangci-lint-action has compatibility issues with v2.1.6 (uses --out-format flag which v2 doesn't support). Install golangci-lint manually to avoid action limitations and remove version field from config to be compatible with CI v1.64.8. Local v2.x will work but may show warnings.
This commit is contained in:
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -78,11 +78,13 @@ jobs:
|
||||
with:
|
||||
go-version: '1.24'
|
||||
|
||||
- name: Install golangci-lint
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8
|
||||
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.64.8
|
||||
args: --timeout=5m
|
||||
run: golangci-lint run --timeout=5m
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# golangci-lint configuration
|
||||
# See https://golangci-lint.run/usage/configuration/
|
||||
# Note: CI uses v1.64.8 which doesn't support version: 2
|
||||
# Local v2.x will work with this config but may show a deprecation warning
|
||||
# Note: No version field - compatible with both v1.64.8 (CI) and v2.x (local)
|
||||
# Local v2.x may show a deprecation warning but will work
|
||||
|
||||
run:
|
||||
timeout: 5m
|
||||
|
||||
Reference in New Issue
Block a user