Skip to content

Commit 106c594

Browse files
committed
ci: Updated actions/setup-go
- Updated `actions/setup-go` to `v4`. - Set its `cache` parameter to `false` explicitly within `go-lint` job in `Lint` workflow (to avoid golangci/golangci-lint-action#23) because in `v4` it defaults to `true`. - Removed redundant `cache: true` parameter from `actions/setup-go` within all the other jobs.
1 parent c8d23ee commit 106c594

File tree

4 files changed

+46
-56
lines changed

4 files changed

+46
-56
lines changed

.github/workflows/build.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ env:
99
BIN_NAME: canow-chain
1010

1111
jobs:
12-
1312
build-binary:
1413
name: "Node binary"
1514
strategy:
@@ -24,11 +23,10 @@ jobs:
2423

2524
steps:
2625
- uses: actions/checkout@v3
27-
28-
- uses: actions/setup-go@v3
26+
27+
- uses: actions/setup-go@v4
2928
with:
3029
go-version-file: ./go.mod
31-
cache: true
3230

3331
- name: Build application binary
3432
run: env VERSION="$( git describe --tags ${{ github.sha }})" CGO_ENABLED=1 GOOS=${{ matrix.goos }} GOARCH=amd64 make build

.github/workflows/lint.yml

+34-35
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,44 @@ defaults:
55
run:
66
shell: bash
77

8-
98
jobs:
10-
119
sh-euox-pipefail-check:
1210
name: "Shell pipefail check"
1311
runs-on: ubuntu-latest
14-
12+
1513
steps:
1614
- uses: actions/checkout@v3
1715

1816
- name: Run 'set -euox pipefail' check
1917
run: bash ./.github/scripts/ensure_set_euox_pipefail.sh
20-
18+
2119
md-link-check:
2220
name: "Broken Markdown links"
2321
runs-on: ubuntu-latest
24-
22+
2523
steps:
2624
- uses: actions/checkout@v3
2725

2826
- name: Run Markdown link check
2927
uses: gaurav-nelson/github-action-markdown-link-check@v1
3028
with:
31-
config-file: '.github/linters/mlc_config.json'
32-
use-quiet-mode: 'yes'
33-
29+
config-file: ".github/linters/mlc_config.json"
30+
use-quiet-mode: "yes"
31+
3432
go-lint:
3533
# We can't use VALIDATE_GO from super linter because of this issue:
3634
# https://github.com/github/super-linter/issues/143
3735
name: "Golang"
3836
runs-on: ubuntu-latest
39-
37+
4038
steps:
4139
- uses: actions/checkout@v3
4240

43-
- uses: actions/setup-go@v3
41+
- uses: actions/setup-go@v4
4442
with:
4543
go-version-file: ./go.mod
46-
44+
cache: false # to bypass https://github.com/golangci/golangci-lint-action/issues/23
45+
4746
- name: Run golangci-lint
4847
uses: golangci/golangci-lint-action@v3
4948
with:
@@ -53,30 +52,30 @@ jobs:
5352
super-lint:
5453
name: "Super Linter"
5554
runs-on: ubuntu-latest
56-
55+
5756
steps:
58-
- uses: actions/checkout@v3
59-
with:
60-
fetch-depth: 0 # Required to fetch version
57+
- uses: actions/checkout@v3
58+
with:
59+
fetch-depth: 0 # Required to fetch version
6160

62-
- name: Run Super Linter
63-
uses: github/super-linter/slim@v4
64-
env:
65-
IGNORE_GITIGNORED_FILES: true
66-
FILTER_REGEX_EXCLUDE: vue/.*
67-
DEFAULT_BRANCH: main
68-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
69-
LOG_LEVEL: WARN
70-
VALIDATE_ALL_CODEBASE: true
71-
MULTI_STATUS: true
61+
- name: Run Super Linter
62+
uses: github/super-linter/slim@v4
63+
env:
64+
IGNORE_GITIGNORED_FILES: true
65+
FILTER_REGEX_EXCLUDE: vue/.*
66+
DEFAULT_BRANCH: main
67+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
68+
LOG_LEVEL: WARN
69+
VALIDATE_ALL_CODEBASE: true
70+
MULTI_STATUS: true
7271

73-
VALIDATE_BASH: true
74-
VALIDATE_DOCKERFILE_HADOLINT: true
75-
VALIDATE_ENV: true
76-
VALIDATE_GITHUB_ACTIONS: true
77-
VALIDATE_JSON: true
78-
VALIDATE_MARKDOWN: true
79-
# VALIDATE_OPENAPI: true
80-
VALIDATE_PYTHON_PYLINT: true
81-
VALIDATE_XML: true
82-
VALIDATE_YAML: true
72+
VALIDATE_BASH: true
73+
VALIDATE_DOCKERFILE_HADOLINT: true
74+
VALIDATE_ENV: true
75+
VALIDATE_GITHUB_ACTIONS: true
76+
VALIDATE_JSON: true
77+
VALIDATE_MARKDOWN: true
78+
# VALIDATE_OPENAPI: true
79+
VALIDATE_PYTHON_PYLINT: true
80+
VALIDATE_XML: true
81+
VALIDATE_YAML: true

.github/workflows/release.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ env:
1212
BIN_NAME: canow-chain
1313

1414
jobs:
15-
1615
release-binary:
1716
name: "Node binary"
1817
runs-on: ubuntu-latest
1918
outputs:
2019
RELEASE_VERSION: ${{ steps.set-version.outputs.RELEASE_VERSION }}
21-
20+
2221
steps:
2322
- uses: actions/checkout@v3
2423
with:
@@ -31,10 +30,9 @@ jobs:
3130
RELEASE_VERSION=$( git describe --tags "${{ github.sha }}")
3231
echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"
3332
34-
- uses: actions/setup-go@v3
33+
- uses: actions/setup-go@v4
3534
with:
3635
go-version-file: ./go.mod
37-
cache: true
3836

3937
- name: Download binary artifacts
4038
uses: actions/download-artifact@v3
@@ -78,8 +76,6 @@ jobs:
7876
env:
7977
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
8078

81-
82-
8379
release-docker:
8480
name: "Docker image"
8581
needs: release-binary
@@ -104,7 +100,7 @@ jobs:
104100
registry: ghcr.io
105101
username: ${{ github.actor }}
106102
password: ${{ secrets.GH_TOKEN }}
107-
103+
108104
- name: Configure Docker image metadata
109105
id: meta
110106
uses: docker/metadata-action@v4
@@ -119,7 +115,7 @@ jobs:
119115
labels: |
120116
org.opencontainers.image.vendor="Canow"
121117
org.opencontainers.image.created={{date 'dddd, MMMM Do YYYY, h:mm:ss a'}}
122-
# org.opencontainers.image.documentation=""
118+
# org.opencontainers.image.documentation=""
123119

124120
- name: Build and push image
125121
uses: docker/build-push-action@v3

.github/workflows/test.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222

23-
- uses: actions/setup-go@v3
23+
- uses: actions/setup-go@v4
2424
with:
2525
go-version-file: ./go.mod
26-
cache: true
2726

2827
- name: Install ginkgo
2928
working-directory: ./..
@@ -83,10 +82,9 @@ jobs:
8382
run: |
8483
bash import-keys.sh
8584
86-
- uses: actions/setup-go@v3
85+
- uses: actions/setup-go@v4
8786
with:
8887
go-version-file: ./go.mod
89-
cache: true
9088

9189
- name: Install ginkgo
9290
working-directory: ./..
@@ -134,15 +132,14 @@ jobs:
134132
- name: Load new canow-chain Docker image
135133
run: docker load -i canow-chain-build.tar
136134

137-
- uses: actions/setup-go@v3
135+
- uses: actions/setup-go@v4
138136
with:
139137
go-version-file: ./go.mod
140-
cache: true
141138

142139
- name: Install ginkgo
143140
working-directory: ./..
144141
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
145-
142+
146143
# Run tests
147144
- name: Set up network with old canow-chain version (testnet-latest)
148145
working-directory: ./tests/upgrade/integration
@@ -234,7 +231,7 @@ jobs:
234231
uses: actions/download-artifact@v3
235232
with:
236233
name: report-integration.xml
237-
234+
238235
- name: Download pre-upgrade tests report
239236
uses: actions/download-artifact@v3
240237
with:
@@ -249,7 +246,7 @@ jobs:
249246
uses: actions/download-artifact@v3
250247
with:
251248
name: report-pricing-proposal.xml
252-
249+
253250
- name: Download pricing change tesst report
254251
uses: actions/download-artifact@v3
255252
with:

0 commit comments

Comments
 (0)