Skip to content

Commit

Permalink
Use go 1.22 for self-hosted GHAs (#31767)
Browse files Browse the repository at this point in the history
* Switch to use setup-environment-action instead of setup-go directly
  • Loading branch information
Abacn authored Jul 8, 2024
1 parent 8a88f15 commit 746f3c5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
6 changes: 4 additions & 2 deletions .github/actions/setup-environment-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ runs:
cache-read-only: ${{ inputs.disable-cache }}
- name: Install Go
if: ${{ inputs.go-version != '' }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version == 'default' && '1.21' || inputs.go-version }} # never set patch, to get latest patch releases.
go-version: ${{ inputs.go-version == 'default' && '1.22' || inputs.go-version }} # never set patch, to get latest patch releases.
cache-dependency-path: |
sdks/go.sum
7 changes: 3 additions & 4 deletions .github/workflows/go_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-go@v5
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
go-version: '1.22'
cache-dependency-path: |
sdks/go.sum
go-version: default
- name: Delete old coverage
run: "cd sdks && rm -rf .coverage.txt || :"
- name: Run coverage
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/local_env_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
go-version: '1.22'
- uses: actions/setup-python@v5
with:
python-version: '3.8'
go-version: default
python-version: default
- name: "Installing local env dependencies"
run: "sudo ./local-env-setup.sh"
id: local_env_install_ubuntu
Expand All @@ -64,12 +63,11 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- uses: actions/setup-python@v5
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
python-version: '3.8'
go-version: default
python-version: default
- name: "Installing local env dependencies"
run: "./local-env-setup.sh"
id: local_env_install_mac
Expand Down

0 comments on commit 746f3c5

Please sign in to comment.