Skip to content

Commit

Permalink
Merge pull request #170 from scaleway/fix_caching
Browse files Browse the repository at this point in the history
chore: fix checkout and setup-go ordering to optimize cache usage
  • Loading branch information
remyleone authored Aug 26, 2024
2 parents b9db956 + 7359ec0 commit 3eae5a9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ jobs:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
# Checkout should always be before setup-go to ensure caching is working
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Run unit tests
run: make test
build-test:
Expand All @@ -29,13 +30,14 @@ jobs:
arch: [386, amd64, arm, arm64]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
# Checkout should always be before setup-go to ensure caching is working
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Building binary
run: GOARCH=${{ matrix.arch }} make compile

0 comments on commit 3eae5a9

Please sign in to comment.