From f17df15953fb1d581b9ee33f090bdad85d946e73 Mon Sep 17 00:00:00 2001 From: Saroj <43822041+sarojsarab@users.noreply.github.com> Date: Thu, 23 Mar 2023 10:51:41 +0530 Subject: [PATCH] ci: Fix for combined-failed-spec-ci cache not found issue (#21706) ## Description - Fix for combined-failed-spec-ci cache not found issue ## Type of change - YML file changes ## How Has This Been Tested? - Manual ## Checklist: ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test --- .github/workflows/ci-test.yml | 4 +++- .github/workflows/integration-tests-command.yml | 4 +++- .github/workflows/test-build-docker-image.yml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 3d5a9553d2..7adebe48fa 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -89,11 +89,13 @@ jobs: # In case this is second attempt try restoring failed tests - name: Restore the previous failed combine result if: steps.run_result.outputs.run_result == 'failedtest' - uses: actions/cache@v3 + uses: martijnhols/actions-cache/restore@v3 with: path: | ~/combined_failed_spec_ci key: ${{ github.run_id }}-"ci-test-result" + restore-keys: | + ${{ github.run_id }}-${{ github.job }} # failed_spec_env will contain list of all failed specs # We are using environment variable instead of regular to support multiline diff --git a/.github/workflows/integration-tests-command.yml b/.github/workflows/integration-tests-command.yml index dddf1c86d9..24952469ac 100644 --- a/.github/workflows/integration-tests-command.yml +++ b/.github/workflows/integration-tests-command.yml @@ -133,11 +133,13 @@ jobs: # Force save the CI failed spec list into a cache - name: Store the combined run result for CI if: needs.ci-test.result != 'success' - uses: actions/cache@v3 + uses: martijnhols/actions-cache/save@v3 with: path: | ~/combined_failed_spec_ci key: ${{ github.run_id }}-"ci-test-result" + restore-keys: | + ${{ github.run_id }}-${{ github.job }} # Upload combined failed CI spec list to a file # This is done for debugging. diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index bcfab56e0a..a4b82e18dd 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -114,11 +114,13 @@ jobs: # Force save the CI failed spec list into a cache - name: Store the combined run result for CI if: needs.ci-test.result != 'success' - uses: actions/cache@v3 + uses: martijnhols/actions-cache/save@v3 with: path: | ~/combined_failed_spec_ci key: ${{ github.run_id }}-"ci-test-result" + restore-keys: | + ${{ github.run_id }}-${{ github.job }} # Upload combined failed CI spec list to a file # This is done for debugging.