Skip to content
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ jobs:
runs-on: ${{ needs.setup.outputs.compute-test-go }}
runs-on-small: ${{ needs.setup.outputs.compute-small }}
testonly: true
test-timing-cache-enabled: false
test-timing-cache-restore: false
test-timing-cache-save: false
total-runners: 2 # test runners cannot be less than 2
secrets: inherit

Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ on:
required: false
default: false
type: boolean
test-timing-cache-enabled:
description: Cache the gotestsum test timing data.
test-timing-cache-restore:
description: Restore the gotestsum test timing data from cache.
required: false
default: true
type: boolean
test-timing-cache-save:
description: Upload the gotestsum test timing data to cache.
required: false
default: true
type: boolean
Expand Down Expand Up @@ -139,7 +144,7 @@ jobs:
- uses: ./.github/actions/set-up-gotestsum
- run: mkdir -p ${{ steps.metadata.outputs.go-test-dir }}
- uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
if: inputs.test-timing-cache-enabled
if: inputs.test-timing-cache-restore || inputs.test-timing-cache-save
with:
path: ${{ steps.metadata.outputs.go-test-dir }}
key: ${{ inputs.test-timing-cache-key }}-${{ github.run_number }}
Expand Down Expand Up @@ -641,20 +646,20 @@ jobs:
echo "test-go-results=${test_go_results}"
} | tee -a "$GITHUB_OUTPUT"
# Aggregate, prune, and cache our timing data
- if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-enabled }}
- if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-save }}
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ needs.test-matrix.outputs.go-test-dir }}
key: ${{ inputs.test-timing-cache-key }}-${{ github.run_number }}
restore-keys: |
${{ inputs.test-timing-cache-key }}-
- if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-enabled }}
- if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-save }}
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: ${{ needs.test-matrix.outputs.go-test-dir }}
pattern: ${{ needs.test-go.outputs.go-test-results-download-pattern }}
merge-multiple: true
- if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-enabled }}
- if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-save }}
name: Prune any invalid timing files
run: |
ls -lhR '${{ needs.test-matrix.outputs.go-test-dir }}'
Expand Down
Loading