-
Notifications
You must be signed in to change notification settings - Fork 21
39 lines (37 loc) · 1.11 KB
/
pr-extended-linting.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
name: Extended Linting
## Only trigger tests if source is changing
on:
pull_request:
paths:
- '**.go'
- '**.mod'
- 'go.sum'
jobs:
golangci-lint:
permissions:
# allow read access to the content for analysis.
contents: read
# allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# allow write access to checks to allow the action to annotate code in the PR.
checks: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ">=${{ env.golang-version }}"
cache: false
- name: Generate test files
run: make test/generate
- name: Run golangci-lint
uses: golangci/[email protected]
with:
version: latest
args: --config=.github/.golangci.yml --timeout=30m
only-new-issues: true
skip-cache: true