|
64 | 64 | required: false
|
65 | 65 | default: false
|
66 | 66 | type: boolean
|
67 |
| - test-timing-cache-enabled: |
68 |
| - description: Cache the gotestsum test timing data. |
| 67 | + test-timing-cache-restore-enabled: |
| 68 | + description: Restore the gotestsum test timing data from cache. |
| 69 | + required: false |
| 70 | + default: true |
| 71 | + type: boolean |
| 72 | + test-timing-cache-save-enabled: |
| 73 | + description: Upload the gotestsum test timing data to cache. |
69 | 74 | required: false
|
70 | 75 | default: true
|
71 | 76 | type: boolean
|
@@ -139,7 +144,7 @@ jobs:
|
139 | 144 | - uses: ./.github/actions/set-up-gotestsum
|
140 | 145 | - run: mkdir -p ${{ steps.metadata.outputs.go-test-dir }}
|
141 | 146 | - uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
142 |
| - if: inputs.test-timing-cache-enabled |
| 147 | + if: inputs.test-timing-cache-restore-enabled || inputs.test-timing-cache-save-enabled |
143 | 148 | with:
|
144 | 149 | path: ${{ steps.metadata.outputs.go-test-dir }}
|
145 | 150 | key: ${{ inputs.test-timing-cache-key }}-${{ github.run_number }}
|
@@ -641,20 +646,20 @@ jobs:
|
641 | 646 | echo "test-go-results=${test_go_results}"
|
642 | 647 | } | tee -a "$GITHUB_OUTPUT"
|
643 | 648 | # Aggregate, prune, and cache our timing data
|
644 |
| - - if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-enabled }} |
| 649 | + - if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-save-enabled }} |
645 | 650 | uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
646 | 651 | with:
|
647 | 652 | path: ${{ needs.test-matrix.outputs.go-test-dir }}
|
648 | 653 | key: ${{ inputs.test-timing-cache-key }}-${{ github.run_number }}
|
649 | 654 | restore-keys: |
|
650 | 655 | ${{ inputs.test-timing-cache-key }}-
|
651 |
| - - if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-enabled }} |
| 656 | + - if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-save-enabled }} |
652 | 657 | uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
653 | 658 | with:
|
654 | 659 | path: ${{ needs.test-matrix.outputs.go-test-dir }}
|
655 | 660 | pattern: ${{ needs.test-go.outputs.go-test-results-download-pattern }}
|
656 | 661 | merge-multiple: true
|
657 |
| - - if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-enabled }} |
| 662 | + - if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-save-enabled }} |
658 | 663 | name: Prune any invalid timing files
|
659 | 664 | run: |
|
660 | 665 | ls -lhR '${{ needs.test-matrix.outputs.go-test-dir }}'
|
|
0 commit comments