Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with codecov/test-results-action #109

Merged
merged 5 commits into from
Mar 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*-local-debug.yml
60 changes: 40 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,28 +134,41 @@ jobs:

- name: Process llvm coverage
shell: bash
run: ./packages/cmake/llvm-cov-export-all.py ./ros_ws/

- name: Troubleshoot
if: failure()
shell: bash
run: |
set -x
set +e
ls -al ${{ github.workspace }}
ls -al .
ls -al ros_ws
ls -al ros_ws/src
cat package.repo
vcs import --force --recursive src/ < package.repo
run: ./packages/cmake/llvm-cov-export-all.py ./ros_ws/build

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
if: env.ACT == ''
if: ${{ env.ACT == '' && !cancelled() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests-${{ matrix.arch }}
name: codecov-umbrella
directory: ros_ws/build/

- name: Test Summary
uses: test-summary/action@v2
if: ${{ env.ACT == '' && !cancelled() }}
with:
paths: "ros_ws/build/*/test_results/*/*.xunit.xml"

- name: Discover test reports
if: ${{ !cancelled() }}
run: |
set -x
test_reports=$(find ros_ws/build -name "*.xunit.xml" | tr '\n' ',')
test_reports=${test_reports%,} # Remove trailing comma

echo "result=$test_reports" >> $GITHUB_OUTPUT
echo $test_reports
shell: bash
id: test_reports

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ steps.test_reports.outputs.result }}

- uses: actions/upload-artifact@v4
# upload the logs even when the build fails
Expand All @@ -165,11 +178,18 @@ jobs:
path: ros_ws/log
retention-days: 90

- name: Test Summary
uses: test-summary/action@v2
with:
paths: "ros_ws/build/*/test_results/*/*.xunit.xml"
if: always()
- name: Troubleshoot
if: failure()
shell: bash
run: |
set -x
set +e
ls -al ${{ github.workspace }}
ls -al .
ls -al ros_ws
ls -al ros_ws/src
cat package.repo
vcs import --force --recursive src/ < package.repo

build-deploy-image:
name: Deployment image
Expand Down
Loading