Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix checkout and setup-go ordering to optimize cache usage #2678

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/acceptance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ jobs:
- webhosting
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Checkout
uses: actions/checkout@v4
- name: Run Acceptance Tests
run: go test -v ./internal/services/${{ matrix.products }} -timeout=2h
env:
Expand All @@ -66,12 +67,13 @@ jobs:
fail-fast: false
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Checkout
uses: actions/checkout@v4
- name: Run scwconfig tests
run: go test -v ./internal/services/scwconfig -timeout=2m
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- uses: actions/checkout@v4
with:
fetch-depth: 2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
misspell:
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ jobs:
- webhosting
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Checkout
uses: actions/checkout@v4
- name: Run Acceptance Tests
run: go test -v ./internal/services/${{ matrix.products }} -timeout=4h
env:
Expand Down Expand Up @@ -92,12 +93,13 @@ jobs:
needs: nightly
if: always()
steps:
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Checkout
uses: actions/checkout@v4
- name: Run sweepers
run: make sweep
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@v4

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tfproviderlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
tfproviderlint:
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
Expand All @@ -20,6 +21,7 @@ jobs:
tfproviderdocs:
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ jobs:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build binaries
run: make build
- name: Run unit tests
Expand Down
Loading