From a2e2c7aa7ce5883af5c8ea486ccb7a2b19e904f6 Mon Sep 17 00:00:00 2001 From: Rd Date: Mon, 19 Aug 2024 09:59:08 +0530 Subject: [PATCH] Removed empty pb file output variable --- .github/workflows/code_coverage.yml | 20 ++++++++++---------- .github/workflows/coverage_report.yml | 12 ++---------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 6d79ba9a4a7..d5f1792cf60 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -16,19 +16,19 @@ concurrency: cancel-in-progress: true jobs: - # check_unit_tests_completed: - # name: Check unit test completed - # runs-on: ubuntu-latest - # steps: - # - name: Wait for unit tests to checks - # uses: ArcticLampyrid/action-wait-for-workflow@v1.2.0 - # with: - # workflow: unit_tests.yml - # sha: auto + check_unit_tests_completed: + name: Check unit test completed + runs-on: ubuntu-latest + steps: + - name: Wait for unit tests to checks + uses: ArcticLampyrid/action-wait-for-workflow@v1.2.0 + with: + workflow: unit_tests.yml + sha: auto compute_changed_files: name: Compute changed files - # needs: check_unit_tests_completed + needs: check_unit_tests_completed runs-on: ubuntu-20.04 outputs: matrix: ${{ steps.compute-file-matrix.outputs.matrix }} diff --git a/.github/workflows/coverage_report.yml b/.github/workflows/coverage_report.yml index 19593b184e6..4a73c2d44fa 100644 --- a/.github/workflows/coverage_report.yml +++ b/.github/workflows/coverage_report.yml @@ -31,8 +31,6 @@ jobs: evaluate-code-coverage-reports: name: Evaluate Code Coverage Reports runs-on: ubuntu-20.04 - outputs: - pb_file_empty: ${{ steps.filter-coverage-reports.outputs.pb_file_empty }} needs: check_code_coverage_completed env: CACHE_DIRECTORY: ~/.bazel_cache @@ -82,12 +80,6 @@ jobs: # Find all coverage_report.pb files in the current directory and subdirectories PB_FILES_LIST=($(find . -name "coverage_report.pb" -type f -print0 | xargs -0 -n 1 echo)) echo "${PB_FILES_LIST[@]}" > pb_files.txt - if [ ! -s pb_files.txt ]; then - echo "::set-output name=pb_file_empty::false" - else - echo "::set-output name=pb_file_empty::true" - echo "No coverage report generated. If this is wrong, you can add '[RunAllTests]' to the PR title to force a run." - fi - name: Set up Bazel uses: abhinavsingh/setup-bazel@v3 @@ -145,9 +137,9 @@ jobs: needs: [ evaluate-code-coverage-reports, comment_coverage_report ] # The expression if: ${{ !cancelled() }} runs a job or step regardless of its success or failure while responding to cancellations, # serving as a cancellation-compliant alternative to if: ${{ always() }} in concurrent workflows. - if: ${{ needs.evaluate-code-coverage-reports.outputs.pb_file_empty != 'true' && !cancelled()}} + if: ${{ !cancelled()}} runs-on: ubuntu-20.04 steps: - name: Check that coverage status is passed - if: ${{ needs.evaluate-code-coverage-reports.outputs.pb_file_empty != 'true' && needs.evaluate-code-coverage-reports.result != 'success' }} + if: ${{ needs.evaluate-code-coverage-reports.result != 'success' }} run: exit 1