diff --git a/.github/workflows/integration-tests-command.yml b/.github/workflows/integration-tests-command.yml index bb5a08b3fb..7c637c8aca 100644 --- a/.github/workflows/integration-tests-command.yml +++ b/.github/workflows/integration-tests-command.yml @@ -99,6 +99,7 @@ jobs: # In case this is second attempt try restoring status of the prior attempt from cache - name: Restore the previous run result + id: cache-appsmith uses: martijnhols/actions-cache@v3.0.2 with: path: | @@ -107,10 +108,17 @@ jobs: restore-keys: | ${{ github.run_id }}-${{ github.job }}-${{ matrix.job }} - # Fetch prior run result - name: Get the previous run result + if: steps.cache-appsmith.outputs.cache-hit == 'true' id: run_result - run: cat ~/run_result 2>/dev/null || echo 'default' + run: | + run_result_env=$(cat ~/run_result) + echo "run_result=$run_result_env" >> $GITHUB_OUTPUT + + - name: Dump steps context + env: + STEPS_CONTEXT: ${{ toJson(steps) }} + run: echo "$STEPS_CONTEXT" # In case this is second attempt try restoring failed tests - name: Restore the previous failed combine result @@ -373,7 +381,7 @@ jobs: # Set status = failedtest - name: Set fail if there are test failures if: failure() - run: echo "run_result=failedtest" >> $GITHUB_OUTPUT > ~/run_result + run: echo "failedtest" >> $GITHUB_OUTPUT > ~/run_result # Create a directory ~/failed_spec_fat and add a dummy file # This will ensure upload and download steps are successful @@ -495,6 +503,7 @@ jobs: # In case this is second attempt try restoring status of the prior attempt from cache - name: Restore the previous run result + id: cache-appsmith uses: martijnhols/actions-cache@v3.0.2 with: path: | @@ -505,8 +514,16 @@ jobs: # Fetch prior run result - name: Get the previous run result + if: steps.cache-appsmith.outputs.cache-hit == 'true' id: run_result - run: cat ~/run_result 2>/dev/null || echo 'default' + run: | + run_result_env=$(cat ~/run_result) + echo "run_result=$run_result_env" >> $GITHUB_OUTPUT + + - name: Dump steps context + env: + STEPS_CONTEXT: ${{ toJson(steps) }} + run: echo "$STEPS_CONTEXT" # In case this is second attempt try restoring failed tests - name: Restore the previous failed combine result @@ -753,7 +770,7 @@ jobs: # Set status = failedtest - name: Set fail if there are test failures if: failure() - run: echo "run_result=failedtest" >> $GITHUB_OUTPUT > ~/run_result + run: echo "failedtest" >> $GITHUB_OUTPUT > ~/run_result # Create a directory ~/failed_spec and add a dummy file # This will ensure upload and download steps are successful diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index b608c0e3c0..40999557e5 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -682,6 +682,7 @@ jobs: # In case this is second attempt try restoring status of the prior attempt from cache - name: Restore the previous run result + id: cache-appsmith uses: martijnhols/actions-cache@v3.0.2 with: path: | @@ -690,10 +691,17 @@ jobs: restore-keys: | ${{ github.run_id }}-${{ github.job }}-${{ matrix.job }} - # Fetch prior run result - name: Get the previous run result + if: steps.cache-appsmith.outputs.cache-hit == 'true' id: run_result - run: cat ~/run_result 2>/dev/null || echo 'default' + run: | + run_result_env=$(cat ~/run_result) + echo "run_result=$run_result_env" >> $GITHUB_OUTPUT + + - name: Dump steps context + env: + STEPS_CONTEXT: ${{ toJson(steps) }} + run: echo "$STEPS_CONTEXT" # In case this is second attempt try restoring failed tests - name: Restore the previous failed combine result @@ -943,7 +951,7 @@ jobs: # Set status = failedtest - name: Set fail if there are test failures if: failure() - run: echo "run_result=failedtest" >> $GITHUB_OUTPUT > ~/run_result + run: echo "failedtest" >> $GITHUB_OUTPUT > ~/run_result # Create a directory ~/failed_spec_fat and add a dummy file # This will ensure upload and download steps are successful @@ -1104,6 +1112,7 @@ jobs: # In case this is second attempt try restoring status of the prior attempt from cache - name: Restore the previous run result + id: cache-appsmith uses: martijnhols/actions-cache@v3.0.2 with: path: | @@ -1114,8 +1123,16 @@ jobs: # Fetch prior run result - name: Get the previous run result + if: steps.cache-appsmith.outputs.cache-hit == 'true' id: run_result - run: cat ~/run_result 2>/dev/null || echo 'default' + run: | + run_result_env=$(cat ~/run_result) + echo "run_result=$run_result_env" >> $GITHUB_OUTPUT + + - name: Dump steps context + env: + STEPS_CONTEXT: ${{ toJson(steps) }} + run: echo "$STEPS_CONTEXT" # In case this is second attempt try restoring failed tests - name: Restore the previous failed combine result @@ -1391,7 +1408,7 @@ jobs: # Set status = failedtest - name: Set fail if there are test failures if: failure() - run: echo "run_result=failedtest" >> $GITHUB_OUTPUT > ~/run_result + run: echo "failedtest" >> $GITHUB_OUTPUT > ~/run_result # Create a directory ~/failed_spec and add a dummy file # This will ensure upload and download steps are successful