Skip to content

Commit e3d6484

Browse files
author
Smyslov Maxim
committed
lind and test to different files
Signed-off-by: Smyslov Maxim <[email protected]>
1 parent 549ae62 commit e3d6484

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
File renamed without changes.

.github/workflows/lint.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches-ignore: [ main ]
6+
7+
8+
env:
9+
GO_VERSION: '1.24'
10+
GOLANGCI_LINT_VERSION: 'v2.1'
11+
12+
jobs: # example from https://github.com/golangci/golangci-lint-action/tree/main
13+
detect-modules:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
modules: ${{ steps.set-modules.outputs.modules }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version: ${{ env.GO_VERSION }}
22+
- id: set-modules
23+
run: echo "modules=$(go list -m -json | jq -s '.' | jq -c '[.[].Dir]')" >> $GITHUB_OUTPUT
24+
25+
golangci-lint:
26+
needs: detect-modules
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-go@v5
34+
with:
35+
go-version: ${{ env.GO_VERSION }}
36+
- name: golangci-lint ${{ matrix.modules }}
37+
uses: golangci/golangci-lint-action@v8
38+
with:
39+
version: ${{ env.GOLANGCI_LINT_VERSION }}
40+
working-directory: ${{ matrix.modules }}

0 commit comments

Comments
 (0)