mirror of
https://github.com/guggero/chantools.git
synced 2026-08-13 12:33:34 +02:00
multi: use Go 1.24.10 and golang-cli lint action
This commit is contained in:
parent
f427d66243
commit
e90dd3df2a
3 changed files with 18 additions and 17 deletions
25
.github/workflows/main.yml
vendored
25
.github/workflows/main.yml
vendored
|
|
@ -8,12 +8,18 @@ on:
|
|||
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:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
env:
|
||||
GO_VERSION: 1.23.9
|
||||
GO_VERSION: 1.24.10
|
||||
LINT_VERSION: v2.6.2
|
||||
|
||||
jobs:
|
||||
########################
|
||||
|
|
@ -28,18 +34,15 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: create linter cache directory
|
||||
run: mkdir -p /tmp/go-lint-cache
|
||||
|
||||
- name: linter cache
|
||||
uses: actions/cache@v4
|
||||
- name: setup go ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
path: |
|
||||
/tmp/go-lint-cache
|
||||
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-linter-${{ hashFiles('**/go.sum') }}
|
||||
go-version: '${{ env.GO_VERSION }}'
|
||||
|
||||
- name: lint
|
||||
run: make lint
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v9
|
||||
with:
|
||||
version: '${{ env.LINT_VERSION }}'
|
||||
|
||||
########################
|
||||
# run unit tests
|
||||
|
|
|
|||
|
|
@ -41,11 +41,9 @@ linters:
|
|||
|
||||
settings:
|
||||
govet:
|
||||
# Don't report about shadowed variables.
|
||||
shadow: false
|
||||
gofmt:
|
||||
# simplify code: gofmt with `-s` option, true by default.
|
||||
simplify: true
|
||||
disable:
|
||||
# Don't report about shadowed variables.
|
||||
- shadow
|
||||
whitespace:
|
||||
multi-func: true
|
||||
multi-if: true
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# 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
|
||||
# be built from a specified Git state.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue