From ba4e717a2c914209b210c9c80fecd78b2ab7dd61 Mon Sep 17 00:00:00 2001 From: Robert Pirtle Date: Tue, 13 Aug 2024 15:04:59 -0700 Subject: [PATCH] ci: use golang version from go.mod (#551) additionally, updates the setup-go github action from v3 -> v5 --- .github/workflows/build.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 4 ++-- .github/workflows/dependencies-review.yml | 2 +- .github/workflows/lint.yml | 6 ++--- .github/workflows/release-cosmovisor.yml | 4 ++-- .github/workflows/release-rosetta.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .github/workflows/sims-045.yml | 20 ++++++++-------- .github/workflows/sims-046.yml | 20 ++++++++-------- .github/workflows/sims-047.yml | 20 ++++++++-------- .github/workflows/sims-nightly.yml | 8 +++---- .github/workflows/sims.yml | 16 ++++++------- .github/workflows/test.yml | 28 +++++++++++------------ 13 files changed, 70 insertions(+), 70 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4f452bd06d4..fb54d33393f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,9 @@ jobs: go-arch: ["amd64", "arm", "arm64"] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: technote-space/get-diff-action@v6.1.1 id: git_diff diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 34f9bf832633..f2cb8ac0c973 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -23,9 +23,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dependencies-review.yml b/.github/workflows/dependencies-review.yml index 7503a9718030..916f2ebf6a4c 100644 --- a/.github/workflows/dependencies-review.yml +++ b/.github/workflows/dependencies-review.yml @@ -8,7 +8,7 @@ jobs: dependency-review: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: "1.21" check-latest: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b4861d80abc6..883a700aff93 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,11 +14,11 @@ jobs: name: golangci-lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: diff --git a/.github/workflows/release-cosmovisor.yml b/.github/workflows/release-cosmovisor.yml index 9b64aac56ba0..756567f9925a 100644 --- a/.github/workflows/release-cosmovisor.yml +++ b/.github/workflows/release-cosmovisor.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true # get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV - name: Set env diff --git a/.github/workflows/release-rosetta.yml b/.github/workflows/release-rosetta.yml index 577edbce7def..3da68e870bda 100644 --- a/.github/workflows/release-rosetta.yml +++ b/.github/workflows/release-rosetta.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true # get 'v*.*.*' part from 'rosetta/v*.*.*' and save to $GITHUB_ENV - name: Set env diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a129b614642..67abeb0b18ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/sims-045.yml b/.github/workflows/sims-045.yml index 2c768e272720..51b6f3fc9660 100644 --- a/.github/workflows/sims-045.yml +++ b/.github/workflows/sims-045.yml @@ -19,9 +19,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.45.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - run: make build @@ -31,9 +31,9 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -49,9 +49,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.45.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: @@ -68,9 +68,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.45.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: @@ -88,9 +88,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.45.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-046.yml b/.github/workflows/sims-046.yml index 293872992c82..9ef3e3f390fd 100644 --- a/.github/workflows/sims-046.yml +++ b/.github/workflows/sims-046.yml @@ -19,9 +19,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.46.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - run: make build @@ -31,9 +31,9 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -50,9 +50,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.46.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: @@ -69,9 +69,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.46.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: @@ -88,9 +88,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.46.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-047.yml b/.github/workflows/sims-047.yml index 8219ff6edf24..592ecf785385 100644 --- a/.github/workflows/sims-047.yml +++ b/.github/workflows/sims-047.yml @@ -19,9 +19,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.47.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - run: make build @@ -31,9 +31,9 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -50,9 +50,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.47.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: @@ -69,9 +69,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.47.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: @@ -88,9 +88,9 @@ jobs: - uses: actions/checkout@v3 with: ref: "release/v0.47.x" - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims-nightly.yml b/.github/workflows/sims-nightly.yml index 804bf9147b06..20f86909c27f 100644 --- a/.github/workflows/sims-nightly.yml +++ b/.github/workflows/sims-nightly.yml @@ -20,9 +20,9 @@ jobs: contents: none runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - name: Install runsim run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0 @@ -35,9 +35,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 45ac6f0f609a..06239b0c5bb3 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -19,9 +19,9 @@ jobs: if: "!contains(github.event.head_commit.message, 'skip-sims')" steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - run: make build - name: Install runsim @@ -37,9 +37,9 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: @@ -54,9 +54,9 @@ jobs: needs: [build] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: @@ -72,9 +72,9 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - uses: actions/cache@v3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 511b3eb7d8c4..4403a3ea7d5c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,9 +17,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true - name: Create a file with all core Cosmos SDK pkgs run: go list ./... > pkgs.txt @@ -51,9 +51,9 @@ jobs: part: ["00", "01", "02", "03"] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true cache: true cache-dependency-path: go.sum @@ -83,9 +83,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true cache: true cache-dependency-path: go.sum @@ -114,9 +114,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true cache: true cache-dependency-path: go.sum @@ -146,9 +146,9 @@ jobs: timeout-minutes: 15 steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true cache: true cache-dependency-path: go.sum @@ -176,9 +176,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true cache: true cache-dependency-path: go.sum @@ -202,9 +202,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version-file: "go.mod" check-latest: true cache: true cache-dependency-path: simapp/go.sum