From 3205ad3096d16c88fa71999e95b041348ac925a0 Mon Sep 17 00:00:00 2001 From: Cosmic Vagabond <121588426+cosmic-vagabond@users.noreply.github.com> Date: Thu, 16 May 2024 02:53:56 +0200 Subject: [PATCH] ci: add go env --- .github/workflows/software-upgrade-test.yml | 63 +++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/.github/workflows/software-upgrade-test.yml b/.github/workflows/software-upgrade-test.yml index 141c28192..fb8dfde03 100644 --- a/.github/workflows/software-upgrade-test.yml +++ b/.github/workflows/software-upgrade-test.yml @@ -457,6 +457,19 @@ jobs: key: ${{ runner.os }}-chain-init-${{ needs.retrieve-latest-tag.outputs.LATEST_TAG }} if: steps.cache-create-second-validator.outputs.cache-hit != 'true' + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + if: steps.cache-create-second-validator.outputs.cache-hit != 'true' + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.21" + if: steps.cache-create-second-validator.outputs.cache-hit != 'true' + - name: Restore new binary from cache uses: actions/cache@v4 with: @@ -523,6 +536,19 @@ jobs: key: ${{ runner.os }}-create-second-validator-${{ needs.retrieve-latest-tag.outputs.LATEST_TAG }} if: steps.cache-prepare-validator-data.outputs.cache-hit != 'true' + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + if: steps.cache-prepare-validator-data.outputs.cache-hit != 'true' + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.21" + if: steps.cache-prepare-validator-data.outputs.cache-hit != 'true' + - name: Restore new binary from cache uses: actions/cache@v4 with: @@ -589,6 +615,19 @@ jobs: key: ${{ runner.os }}-prepare-validator-data-${{ needs.retrieve-latest-tag.outputs.LATEST_TAG }} if: steps.cache-submit-new-proposal.outputs.cache-hit != 'true' + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + if: steps.cache-submit-new-proposal.outputs.cache-hit != 'true' + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.21" + if: steps.cache-submit-new-proposal.outputs.cache-hit != 'true' + - name: Restore new binary from cache uses: actions/cache@v4 with: @@ -654,6 +693,19 @@ jobs: key: ${{ runner.os }}-submit-new-proposal-${{ needs.retrieve-latest-tag.outputs.LATEST_TAG }} if: steps.cache-upgrade-to-new-binary.outputs.cache-hit != 'true' + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + if: steps.cache-upgrade-to-new-binary.outputs.cache-hit != 'true' + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.21" + if: steps.cache-upgrade-to-new-binary.outputs.cache-hit != 'true' + - name: Restore new binary from cache uses: actions/cache@v4 with: @@ -694,6 +746,17 @@ jobs: /home/runner/.elys2 key: ${{ needs.build-new-binary.outputs.CACHE_KEY }}-upgrade-to-new-binary + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.21" + - name: Create new snapshot file run: | SANITIZED_HEAD_REF=${{ github.head_ref || github.ref }}