-
Notifications
You must be signed in to change notification settings - Fork 52
61 lines (54 loc) · 2.11 KB
/
golangci-lint.yaml
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
name: golangci-lint
on:
pull_request:
concurrency:
group: "${{ github.workflow }}/${{ github.ref }}"
cancel-in-progress: true
jobs:
golangci:
name: lint
# DO NOT PIN THIS TO A GO VERSION!
# We automatically use the go minor version in the mod file and will miss golang updates and issues relate to new go versions.
# Yes there is one linter rowserrcheck automatically turned off because of generics
# - unless we are doing DB development it does not matter, and it should be fixed soon.
runs-on: ubuntu-latest
container:
image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main
steps:
- name: Trust my checkout
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- uses: actions/checkout@v3
- name: get golangci-lint version
id: lint
run: |
version=v$(cat .tool-versions | grep golangci-lint | cut -d " " -f 2 )
echo "golangci-lint version: '${version}'"
echo "version=${version}" >> $GITHUB_OUTPUT;
- name: lint acceptance
uses: golangci/[email protected]
with:
working-directory: src/acceptance
args: --config='../../.golangci.yaml' -v --timeout='2m'
version: ${{ steps.lint.outputs.version }}
skip-cache: true
- name: lint autoscaler
uses: golangci/[email protected]
with:
working-directory: src/autoscaler
args: --config='../../.golangci.yaml' --timeout='2m'
version: ${{ steps.lint.outputs.version }}
skip-cache: true
- name: lint changelog
uses: golangci/[email protected]
with:
working-directory: src/changelog
args: --config ../../.golangci.yaml
version: ${{ steps.lint.outputs.version }}
skip-cache: true
- name: lint changeloglockcleaner
uses: golangci/[email protected]
with:
working-directory: src/changeloglockcleaner
args: --config ../../.golangci.yaml
version: ${{ steps.lint.outputs.version }}
skip-cache: true