diff --git a/.github/actions/install-go/action.yml b/.github/actions/install-go/action.yml index e2d4b9be8c..4e392688db 100644 --- a/.github/actions/install-go/action.yml +++ b/.github/actions/install-go/action.yml @@ -6,6 +6,10 @@ inputs: description: "to cache or not to cache, that is the question" required: false default: "true" + cache-dependency-path: + description: "forwards go actions/setup-go" + required: false + runs: using: composite @@ -16,3 +20,4 @@ runs: go-version: '1.21' check-latest: true cache: ${{ inputs.cache }} + cache-dependency-path: ${{ inputs.cache-dependency-path }} diff --git a/.github/workflows/auto-generated-checker.yml b/.github/workflows/auto-generated-checker.yml index 5dbc5f45ab..7a7c6697f6 100644 --- a/.github/workflows/auto-generated-checker.yml +++ b/.github/workflows/auto-generated-checker.yml @@ -12,11 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "1.21" - check-latest: true - cache: true + uses: ./.github/actions/install-go - shell: bash run: scripts/mock.gen.sh - shell: bash diff --git a/.github/workflows/hypersdk-static-analysis.yml b/.github/workflows/hypersdk-static-analysis.yml index badb2afa88..083f4eeb47 100644 --- a/.github/workflows/hypersdk-static-analysis.yml +++ b/.github/workflows/hypersdk-static-analysis.yml @@ -17,11 +17,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "1.21" - check-latest: true - cache: true + uses: ./.github/actions/install-go - name: Run static analysis tests shell: bash run: scripts/tests.lint.sh diff --git a/.github/workflows/hypersdk-unit-tests.yml b/.github/workflows/hypersdk-unit-tests.yml index e26f0e624d..edfbc8924d 100644 --- a/.github/workflows/hypersdk-unit-tests.yml +++ b/.github/workflows/hypersdk-unit-tests.yml @@ -17,11 +17,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "1.21" - check-latest: true - cache: true + uses: ./.github/actions/install-go - name: Run unit tests shell: bash run: scripts/tests.unit.sh diff --git a/.github/workflows/morpheusvm-static-analysis.yml b/.github/workflows/morpheusvm-static-analysis.yml index 8259a3cf81..6e417bd19c 100644 --- a/.github/workflows/morpheusvm-static-analysis.yml +++ b/.github/workflows/morpheusvm-static-analysis.yml @@ -18,11 +18,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: ./.github/actions/install-go with: - go-version: "1.21" - check-latest: true - cache: true cache-dependency-path: | go.sum examples/morpheusvm/go.sum diff --git a/.github/workflows/tidy-checker.yml b/.github/workflows/tidy-checker.yml index 8f7c00e337..2f388fdd4e 100644 --- a/.github/workflows/tidy-checker.yml +++ b/.github/workflows/tidy-checker.yml @@ -12,11 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "1.21" - check-latest: true - cache: true + uses: ./.github/actions/install-go - shell: bash run: go mod tidy - shell: bash diff --git a/.github/workflows/tokenvm-release.yml b/.github/workflows/tokenvm-release.yml index d3ad118e91..440ee3a6b5 100644 --- a/.github/workflows/tokenvm-release.yml +++ b/.github/workflows/tokenvm-release.yml @@ -8,9 +8,9 @@ on: branches: - main tags: - - "*" + - '*' pull_request: - types: [labeled,synchronize,reopened] + types: [labeled, synchronize, reopened] jobs: token-wallet-release: @@ -20,11 +20,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: ./.github/actions/install-go with: - go-version: "1.21" - check-latest: true - cache: true cache-dependency-path: | go.sum examples/tokenvm/go.sum @@ -48,11 +45,8 @@ jobs: - name: Git checkout uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: ./.github/actions/install-go with: - go-version: "1.21" - check-latest: true - cache: true cache-dependency-path: | go.sum examples/tokenvm/go.sum diff --git a/.github/workflows/tokenvm-static-analysis.yml b/.github/workflows/tokenvm-static-analysis.yml index d4086c7811..fac509c2bd 100644 --- a/.github/workflows/tokenvm-static-analysis.yml +++ b/.github/workflows/tokenvm-static-analysis.yml @@ -18,11 +18,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: ./.github/actions/install-go with: - go-version: "1.21" - check-latest: true - cache: true cache-dependency-path: | go.sum examples/tokenvm/go.sum diff --git a/.github/workflows/tokenvm-sync-tests.yml b/.github/workflows/tokenvm-sync-tests.yml index 8fc1bbdae9..7b23043f39 100644 --- a/.github/workflows/tokenvm-sync-tests.yml +++ b/.github/workflows/tokenvm-sync-tests.yml @@ -8,7 +8,7 @@ on: branches: - main pull_request: - types: [labeled,synchronize,reopened] + types: [labeled, synchronize, reopened] jobs: tokenvm-sync-tests: @@ -20,11 +20,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: ./.github/actions/install-go with: - go-version: "1.21" - check-latest: true - cache: true cache-dependency-path: | go.sum examples/tokenvm/go.sum @@ -33,7 +30,7 @@ jobs: shell: bash run: scripts/run.sh env: - MODE: "full-test" + MODE: 'full-test' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true diff --git a/.github/workflows/tokenvm-unit-tests.yml b/.github/workflows/tokenvm-unit-tests.yml index 56fb2002c2..68570136f6 100644 --- a/.github/workflows/tokenvm-unit-tests.yml +++ b/.github/workflows/tokenvm-unit-tests.yml @@ -8,7 +8,7 @@ on: branches: - main pull_request: - types: [labeled,synchronize,reopened] + types: [labeled, synchronize, reopened] jobs: tokenvm-unit-tests: @@ -20,11 +20,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v5 + uses: ./.github/actions/install-go with: - go-version: "1.21" - check-latest: true - cache: true cache-dependency-path: | go.sum examples/tokenvm/go.sum @@ -51,7 +48,7 @@ jobs: shell: bash run: scripts/run.sh env: - MODE: "test" + MODE: 'test' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}