Skip to content

Commit a76e610

Browse files
authored
.github: Avoid disabling the go mod pkg cache for the golangci-lint action (#2660)
* .github: Avoid disabling go mod cache for the golangci-lint action Update the sanity workflow and avoid setting the 'skip-pkg-cache' option to true so the golangci-lint action can start caching and restoring the ~/go/pkg directory during CI runs. Signed-off-by: timflannagan <[email protected]> * .github: Separate the golangci-lint step into it's own job As advertised in the action's official documentation, it's easier to separate this action into it's own job so it can run in parallel with other jobs defined within an individual workflow. When removing this flag in the previous commit, the action was silently failing as it couldn't access the go module package cache due to what appeared to be permissions-related failures. Moving the golangci-lint action to it's own job fixed those silent failures. Signed-off-by: timflannagan <[email protected]>
1 parent 094ae7b commit a76e610

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/sanity.yaml

+15-13
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ on:
66
pull_request:
77
workflow_dispatch:
88
jobs:
9-
sanity:
9+
vendor:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v1
13-
- uses: actions/setup-go@v2
14-
with:
15-
go-version: '~1.17'
16-
- name: Run sanity checks
17-
run: make vendor && make diff
18-
- name: Run linting checks
19-
uses: "golangci/golangci-lint-action@v2"
20-
with:
21-
version: "v1.43"
22-
skip-go-installation: true
23-
skip-pkg-cache: true
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-go@v2
14+
with:
15+
go-version: '~1.17'
16+
- name: Run sanity checks
17+
run: make vendor && make diff
18+
lint:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Run linting checks
23+
uses: "golangci/golangci-lint-action@v2"
24+
with:
25+
version: "v1.43"

0 commit comments

Comments
 (0)