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

Update Test Coverage Destinations #325

Merged
merged 7 commits into from
Oct 1, 2024
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
7 changes: 4 additions & 3 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ exclude_patterns = [
"tests/**"
]

[[analyzers]]
name = "test-coverage"

[[analyzers]]
name = "shell"

Expand All @@ -36,3 +33,7 @@ name = "docker"

[[analyzers]]
name = "cxx"
[analyzers.meta]
misra_compliance = true
cyclomatic_complexity_threshold = "very-high"

18 changes: 14 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}

- name: Fix Dubious Ownership
run: git config --global --add safe.directory /opt/Autonomy_Software
Expand All @@ -42,10 +43,10 @@ jobs:
cd /opt/Autonomy_Software/
git fetch --force --recurse-submodules
branch=${{ steps.extract_branch.outputs.branch }}
echo $branch
git reset --hard origin/$branch
git checkout $branch
git pull --ff-only
echo ${{ github.event.pull_request.head.sha }}
git reset --hard ${{ github.event.pull_request.head.sha }}
git checkout ${{ github.event.pull_request.head.sha }}
# git pull --ff-only
git submodule update --force --recursive --init
git config --global --add safe.directory /opt/Autonomy_Software/external

Expand All @@ -64,6 +65,15 @@ jobs:
ctest --output-on-failure -T Test -T Coverage
ctest --output-on-failure --output-junit Test.xml
gcovr --root . --xml-pretty --output Coverage.xml
lcov -c -d . -o coverage.info

- name: Upload coverage to deepsource
run: |
cd /opt/Autonomy_Software/build
curl https://deepsource.io/cli | sh
./bin/deepsource report --analyzer test-coverage --key cxx --value-file ./coverage.info
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
Loading