Skip to content

golangci-lint golangci-lint # #59

golangci-lint golangci-lint #

golangci-lint golangci-lint # #59

Workflow file for this run

name: golangci-lint
run-name: 'golangci-lint ${{github.workflow}} #${{ github.event.pull_request.number }}'
on:
pull_request:
push:
branches:
- "master"
env:
GO_VERSION: 1.22
GOLANGCI_LINT_VERSION: v1.60
jobs:
detect-modules:
runs-on: ubuntu-latest
outputs:
modules: ${{ steps.set-modules.outputs.modules }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- id: set-modules
run: echo "modules=$(go list -m -json | jq -s '.' | jq -c '[.[].Dir]')" >> $GITHUB_OUTPUT
golangci-lint:
needs: detect-modules
runs-on: ubuntu-latest
strategy:
matrix:
modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: check env
run: |
echo working dir `pwd`
ls
echo ${{ matrix.modules }}
go version
- name: golangci-lint ${{ matrix.modules }}
continue-on-error: true
timeout-minutes: 20
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
working-directory: ${{ matrix.modules }}
args: --verbose --timeout=20m0s --out-format=github-actions