Skip to content

Commit

Permalink
Checkout before setup Go in GitHub Actions for caching
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez committed May 13, 2023
1 parent 1617c02 commit 4603721
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ jobs:
- 1.19.x
- 1.20.x
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Test
shell: bash
# SDK is currently being released with go 1.18, this cannot perform
Expand Down Expand Up @@ -63,16 +63,16 @@ jobs:
- os: macos-latest
go-version: 1.16.x
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Test
shell: bash
run: make unit-old-go-race-cover
Expand Down Expand Up @@ -102,22 +102,23 @@ jobs:
- os: windows-latest
go-version: 1.12.x
steps:
- name: Setup Go env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}/go" >> $GITHUB_ENV
echo "${{ github.workspace }}/go/bin" >> $GITHUB_PATH
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
path: go/src/github.com/aws/aws-sdk-go

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: go/src/github.com/aws/aws-sdk-go

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
path: go/src/github.com/aws/aws-sdk-go
- name: Setup Go env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}/go" >> $GITHUB_ENV
echo "${{ github.workspace }}/go/bin" >> $GITHUB_PATH
- name: Test
shell: bash
Expand Down

0 comments on commit 4603721

Please sign in to comment.