You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-5
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ jobs:
36
36
name: lint
37
37
runs-on: ubuntu-latest
38
38
steps:
39
+
- uses: actions/setup-go@v2
39
40
- uses: actions/checkout@v2
40
41
- name: golangci-lint
41
42
uses: golangci/golangci-lint-action@v2
@@ -52,9 +53,6 @@ jobs:
52
53
# Optional: show only new issues if it's a pull request. The default value is `false`.
53
54
# only-new-issues: true
54
55
55
-
# Optional: if set to true then the action will use pre-installed Go.
56
-
# skip-go-installation: true
57
-
58
56
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
59
57
# skip-pkg-cache: true
60
58
@@ -92,6 +90,7 @@ jobs:
92
90
name: lint
93
91
runs-on: ${{ matrix.os }}
94
92
steps:
93
+
- uses: actions/setup-go@v2
95
94
- uses: actions/checkout@v2
96
95
- name: golangci-lint
97
96
uses: golangci/golangci-lint-action@v2
@@ -133,7 +132,6 @@ The action was implemented with performance in mind:
133
132
134
133
For example, in a repository of [golangci-lint](https://github.com/golangci/golangci-lint) running this action without the cache takes 50s, but with cache takes 14s:
135
134
* in parallel:
136
-
* 13s to download Go
137
135
* 4s to restore 50 MB of cache
138
136
* 1s to find and install `golangci-lint`
139
137
* 1s to run `golangci-lint` (it takes 35s without cache)
* restore [cache](https://github.com/actions/cache) of previous analyzes
154
152
* fetch [action config](https://github.com/golangci/golangci-lint/blob/master/assets/github-action-config.json) and find the latest `golangci-lint` patch version
155
153
for needed version (users of this action can specify only minor version of `golangci-lint`). After that install [golangci-lint](https://github.com/golangci/golangci-lint) using [@actions/tool-cache](https://github.com/actions/toolkit/tree/master/packages/tool-cache)
156
-
* install the latest Go 1.x version using [@actions/setup-go](https://github.com/actions/setup-go)
157
154
2. Run `golangci-lint` with specified by user `args`
0 commit comments