-
Notifications
You must be signed in to change notification settings - Fork 8
68 lines (65 loc) · 2.37 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: lint
on:
workflow_call:
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: allow write access to checks to allow the action to annotate code in the PR.
checks: write
jobs:
lint:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
# By default, the GitHub Action on Windows uses `core.autocrlf=true`.
# LF is converted to CRLF, this produces reports from formatters (gofmt/gofumpt/etc.).
- run: "git config --global core.autocrlf input"
- uses: actions/checkout@v4
with:
path: ${{ github.repository }}
- uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/meta
path: ${{ github.repository_owner }}/meta
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: ${{ github.repository }}
# Optional: golangci-lint command line arguments.
args: |
--config="${{ github.workspace }}/${{ github.repository_owner }}/meta/golangci.yml" --timeout=5m
lint-soft:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
# By default, the GitHub Action on Windows uses `core.autocrlf=true`.
# LF is converted to CRLF, this produces reports from formatters (gofmt/gofumpt/etc.).
- run: "git config --global core.autocrlf input"
- uses: actions/checkout@v4
with:
path: ${{ github.repository }}
- uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/meta
path: ${{ github.repository_owner }}/meta
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: ${{ github.repository }}
# Optional: golangci-lint command line arguments.
args: |
--config="${{ github.workspace }}/${{ github.repository_owner }}/meta/golangci-soft.yml" --timeout=5m