@@ -313,31 +313,32 @@ jobs:
313
313
cd scripts/health_metrics/generate_code_coverage_report
314
314
swift run CoverageReportGenerator --presubmit "firebase/firebase-ios-sdk" --head-commit "${GITHUB_SHA}" --token $(gcloud auth print-identity-token) --xcresult-dir "/Users/runner/test/codecoverage" --log-link "https://github.com/firebase/firebase-ios-sdk/actions/runs/${GITHUB_RUN_ID}" --pull-request-num ${{github.event.pull_request.number}} --base-commit "$base_commit"
315
315
fi
316
- - name : Incremental Code Coverage
317
- if : github.event.pull_request.merged != true && github.event.action != 'closed'
318
- env :
319
- base_commit : ${{ needs.check.outputs.base_commit }}
320
- run : |
321
- # Get Head commit of the branch, instead of a merge commit created by actions/checkout.
322
- GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha)
323
- # Get a JSON of `git diff` from the base commit.
324
- git diff -U0 ${base_commit} "${GITHUB_SHA}" | scripts/health_metrics/git_diff_to_json.sh > scripts/health_metrics/generate_code_coverage_report/git_diff.json
325
- cat "scripts/health_metrics/generate_code_coverage_report/git_diff.json"
326
- if [ -d "${{steps.download.outputs.download-path}}" ]; then
327
- # Create an uncovered_file_lines.json including code lines not covered by tests.
328
- cd scripts/health_metrics/generate_code_coverage_report
329
- swift run IncrementalCoverageReportGenerator --changed-files "git_diff.json" --file-archive-root-path "${GITHUB_WORKSPACE}" --xcresult-dir "${{steps.download.outputs.download-path}}" --uncovered-line-file-json "uncovered_file_lines.json"
330
- # Post uncovered lines to PRs.
331
- pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
332
- cd ..
333
- bundle install
334
- INPUT_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }} \
335
- GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" \
336
- UNCOVERED_LINE_FILE="generate_code_coverage_report/uncovered_file_lines.json" \
337
- TESTING_COMMIT="${GITHUB_SHA}" \
338
- PULL_REQUEST="${pull_number}" \
339
- bundle exec ruby post_incremental_coverage_in_pr.rb
340
- fi
316
+ # Will reactivate the job after the issue #8305 is resovled.
317
+ # - name: Incremental Code Coverage
318
+ # if: github.event.pull_request.merged != true && github.event.action != 'closed'
319
+ # env:
320
+ # base_commit: ${{ needs.check.outputs.base_commit }}
321
+ # run: |
322
+ # # Get Head commit of the branch, instead of a merge commit created by actions/checkout.
323
+ # GITHUB_SHA=$(cat $GITHUB_EVENT_PATH | jq -r .pull_request.head.sha)
324
+ # # Get a JSON of `git diff` from the base commit.
325
+ # git diff -U0 ${base_commit} "${GITHUB_SHA}" | scripts/health_metrics/git_diff_to_json.sh > scripts/health_metrics/generate_code_coverage_report/git_diff.json
326
+ # cat "scripts/health_metrics/generate_code_coverage_report/git_diff.json"
327
+ # if [ -d "${{steps.download.outputs.download-path}}" ]; then
328
+ # # Create an uncovered_file_lines.json including code lines not covered by tests.
329
+ # cd scripts/health_metrics/generate_code_coverage_report
330
+ # swift run IncrementalCoverageReportGenerator --changed-files "git_diff.json" --file-archive-root-path "${GITHUB_WORKSPACE}" --xcresult-dir "${{steps.download.outputs.download-path}}" --uncovered-line-file-json "uncovered_file_lines.json"
331
+ # # Post uncovered lines to PRs.
332
+ # pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
333
+ # cd ..
334
+ # bundle install
335
+ # INPUT_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }} \
336
+ # GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" \
337
+ # UNCOVERED_LINE_FILE="generate_code_coverage_report/uncovered_file_lines.json" \
338
+ # TESTING_COMMIT="${GITHUB_SHA}" \
339
+ # PULL_REQUEST="${pull_number}" \
340
+ # bundle exec ruby post_incremental_coverage_in_pr.rb
341
+ # fi
341
342
- name : Update New Coverage Data
342
343
if : github.event.pull_request.merged && github.event.pull_request.head.repo.full_name == github.repository
343
344
run : |
0 commit comments