From 9a981727a04f5decaafe06f4806046374212fa21 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 3 May 2023 22:23:02 -0400 Subject: [PATCH] refactor: extract env variable for go version --- .github/workflows/test.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index acf903e3bd..0ebd12e091 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,9 @@ name: Tests / Code Coverage on: workflow_call: +env: + GO_VERSION: '1.20' + concurrency: # do not cancel jobs from earlier commits for tags or the main branch group: ${{ github.workflow }}-${{ !startsWith(github.ref, 'refs/tags/') && @@ -18,7 +21,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: ${{ env.GO_VERSION }} - name: Display go version run: go version - name: install tparse @@ -37,7 +40,7 @@ jobs: # - uses: actions/checkout@v3 # - uses: actions/setup-go@v4 # with: - # go-version: 1.20 + # go-version: ${{ env.GO_VERSION }} # - name: Display go version # run: go version # - uses: technote-space/get-diff-action@v6.1.2 @@ -90,7 +93,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: 1.20 + go-version: ${{ env.GO_VERSION }} - uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | @@ -173,7 +176,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: 1.20 + go-version: ${{ env.GO_VERSION }} - uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | @@ -241,7 +244,7 @@ jobs: # - uses: actions/checkout@v3 # - uses: actions/setup-go@v4 # with: - # go-version: 1.20 + # go-version: ${{ env.GO_VERSION }} # - uses: technote-space/get-diff-action@v6.1.2 # id: git_diff # with: