multi: use Go 1.24.10 and golang-cli lint action

This commit is contained in:
Oli 2025-11-15 15:03:27 +01:00
parent f427d66243
commit e90dd3df2a
No known key found for this signature in database
GPG key ID: 8E4256593F177720
3 changed files with 18 additions and 17 deletions

View file

@ -8,12 +8,18 @@ on:
branches: branches:
- "*" - "*"
concurrency:
# Cancel any previous workflows if they are from a PR or push.
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults: defaults:
run: run:
shell: bash shell: bash
env: env:
GO_VERSION: 1.23.9 GO_VERSION: 1.24.10
LINT_VERSION: v2.6.2
jobs: jobs:
######################## ########################
@ -28,18 +34,15 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: create linter cache directory - name: setup go ${{ env.GO_VERSION }}
run: mkdir -p /tmp/go-lint-cache uses: actions/setup-go@v5
- name: linter cache
uses: actions/cache@v4
with: with:
path: | go-version: '${{ env.GO_VERSION }}'
/tmp/go-lint-cache
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-linter-${{ hashFiles('**/go.sum') }}
- name: lint - name: golangci-lint
run: make lint uses: golangci/golangci-lint-action@v9
with:
version: '${{ env.LINT_VERSION }}'
######################## ########################
# run unit tests # run unit tests

View file

@ -41,11 +41,9 @@ linters:
settings: settings:
govet: govet:
# Don't report about shadowed variables. disable:
shadow: false # Don't report about shadowed variables.
gofmt: - shadow
# simplify code: gofmt with `-s` option, true by default.
simplify: true
whitespace: whitespace:
multi-func: true multi-func: true
multi-if: true multi-if: true

View file

@ -1,5 +1,5 @@
# Start with a Golang builder image. # Start with a Golang builder image.
FROM golang:1.24.6-alpine3.22@sha256:c8c5f95d64aa79b6547f3b626eb84b16a7ce18a139e3e9ca19a8c078b85ba80d AS golangbuilder FROM golang:1.24.10-alpine3.22@sha256:12c199a889439928e36df7b4c5031c18bfdad0d33cdeae5dd35b2de369b5fbf5 AS golangbuilder
# Pass a tag, branch or a commit using build-arg. This allows a docker image to # Pass a tag, branch or a commit using build-arg. This allows a docker image to
# be built from a specified Git state. # be built from a specified Git state.