Skip to content

Commit 423fbaf

Browse files
Remove Setup-Go (#403)
* Remove Setup-Go Signed-off-by: Steve Coffman <[email protected]> * Add setup-go to test github actions Signed-off-by: Steve Coffman <[email protected]> * Modify README and action.yml per review Signed-off-by: Steve Coffman <[email protected]> * build dist Co-authored-by: Sergey Vilgelm <[email protected]>
1 parent bcfc6f9 commit 423fbaf

File tree

10 files changed

+49143
-48240
lines changed

10 files changed

+49143
-48240
lines changed

.github/workflows/test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14+
- uses: actions/setup-go@v2
1415
- run: |
1516
npm install
1617
npm run all
@@ -33,6 +34,7 @@ jobs:
3334
pull-requests: read
3435
steps:
3536
- uses: actions/checkout@v2
37+
- uses: actions/setup-go@v2
3638
- uses: ./
3739
with:
3840
version: ${{ matrix.version }}
@@ -51,6 +53,7 @@ jobs:
5153
contents: read
5254
steps:
5355
- uses: actions/checkout@v2
56+
- uses: actions/setup-go@v2
5457
- uses: ./
5558
with:
5659
working-directory: sample-go-mod

README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
name: lint
3737
runs-on: ubuntu-latest
3838
steps:
39+
- uses: actions/setup-go@v2
3940
- uses: actions/checkout@v2
4041
- name: golangci-lint
4142
uses: golangci/golangci-lint-action@v2
@@ -52,9 +53,6 @@ jobs:
5253
# Optional: show only new issues if it's a pull request. The default value is `false`.
5354
# only-new-issues: true
5455

55-
# Optional: if set to true then the action will use pre-installed Go.
56-
# skip-go-installation: true
57-
5856
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
5957
# skip-pkg-cache: true
6058

@@ -92,6 +90,7 @@ jobs:
9290
name: lint
9391
runs-on: ${{ matrix.os }}
9492
steps:
93+
- uses: actions/setup-go@v2
9594
- uses: actions/checkout@v2
9695
- name: golangci-lint
9796
uses: golangci/golangci-lint-action@v2
@@ -133,7 +132,6 @@ The action was implemented with performance in mind:
133132

134133
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:
135134
* in parallel:
136-
* 13s to download Go
137135
* 4s to restore 50 MB of cache
138136
* 1s to find and install `golangci-lint`
139137
* 1s to run `golangci-lint` (it takes 35s without cache)
@@ -153,7 +151,6 @@ Inside our action we perform 3 steps:
153151
* restore [cache](https://github.com/actions/cache) of previous analyzes
154152
* fetch [action config](https://github.com/golangci/golangci-lint/blob/master/assets/github-action-config.json) and find the latest `golangci-lint` patch version
155153
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)
157154
2. Run `golangci-lint` with specified by user `args`
158155
3. Save cache for later builds
159156

action.yml

-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ inputs:
2020
description: "if set to true and the action runs on a pull request - the action outputs only newly found issues"
2121
default: false
2222
required: true
23-
skip-go-installation:
24-
description: "if set to true then action uses pre-installed Go"
25-
default: false
26-
required: true
2723
skip-pkg-cache:
2824
description: "if set to true then the action doesn't cache or restore ~/go/pkg."
2925
default: false

0 commit comments

Comments
 (0)