Skip to content

Commit

Permalink
[CI] Coverage Online Report Location Advance (#268)
Browse files Browse the repository at this point in the history
Output the address information of the test report in advance, so that
the address information of the report can still be output in case of
unit test failure or test coverage failure.
  • Loading branch information
phoenixdong authored Nov 22, 2024
1 parent 8042f95 commit 394467d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/coverage-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ jobs:
submodules: false
set-safe-directory: true

- name: Coverage Online Report
run: |
REPORT_ADDR=$(cat "/workspace/config/report_address")
echo "After 'Run Unit Tests and Check Coverage' is completed/stopped, you can access the test diff-coverage report at the http://${REPORT_ADDR}/${{github.sha}}/cov-report-${{ inputs.backend }}/diff-cover-report-${{ inputs.backend }}.html"
- name: Run Unit Tests and Check Coverage
run: |
# Execute the test coverage script with the appropriate backend and id (commit SHA)
tests/scripts/unit_tests/test_coverage.sh --backend ${{ inputs.backend }} --id ${{ github.sha }} --status online
- name: Coverage Online Report
run: |
REPORT_ADDR=$(cat "/workspace/config/report_address")
echo "You can access the test diff-coverage report at the http://${REPORT_ADDR}/${{github.sha}}/cov-report-${{ inputs.backend }}/diff-cover-report-${{ inputs.backend }}.html"


11 changes: 6 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ jobs:
lfs: false
submodules: false
set-safe-directory: true

- name: Run Unit Test
run: tests/scripts/unit_tests/test_subset.sh --backend ${{ inputs.backend }} --subset ${{ inputs.subset }} --id ${{ github.sha }}


- name: Unit Test Coverage Online Report
run: |
REPORT_ADDR=$(cat "/workspace/config/report_address")
echo "You can access the test coverage report at http://${REPORT_ADDR}/${{github.sha}}/cov-report-${{ inputs.backend }}/index.html"
echo "After 'Run Unit Test' is completed/stopped, you can access the test coverage report at http://${REPORT_ADDR}/${{github.sha}}/cov-report-${{ inputs.backend }}/index.html"
- name: Run Unit Test
run: tests/scripts/unit_tests/test_subset.sh --backend ${{ inputs.backend }} --subset ${{ inputs.subset }} --id ${{ github.sha }}

0 comments on commit 394467d

Please sign in to comment.