Skip to content

Commit

Permalink
GHA: add coverage to GHA
Browse files Browse the repository at this point in the history
update tests to show coverage

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Jul 26, 2024
1 parent 0fa2a80 commit 58c646d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG command_line_tools_url=https://nsscprodmedia.blob.core.windows.net/prod/soft

RUN apt-get update; apt-get install --no-install-recommends -y wget curl libusb-1.0-0 \
clangd ssh nano bash-completion gpg ruby lcov screen libffi7 libffi-dev libfftw3-dev python3-venv \
git-lfs golang-go clang-format python3-pip python3-autopep8 gitlint libmagic1 git gcc g++ gcc-multilib lbzip2 jq sudo zip
git-lfs golang-go clang-format python3-pip python3-autopep8 gitlint libmagic1 git gcc g++ gcc-multilib lbzip2 jq sudo zip make gdb vim wget unzip

ENV NRFUTIL_HOME=/usr/local/share/nrfutil
RUN <<EOT
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Twister build and run x86 tests
run: |
source zephyr/zephyr-env.sh
west twister --platform native_posix --platform unit_testing --coverage --enable-ubsan --enable-lsan --enable-asan --testsuite-root sidewalk --inline-logs --overflow-as-errors -vvv
west twister --platform native_posix --platform unit_testing --coverage --coverage-basedir sidewalk --coverage-formats html,xml --enable-ubsan --enable-lsan --enable-asan --testsuite-root sidewalk --inline-logs --overflow-as-errors -vvv
- name: Upload test results
uses: actions/upload-artifact@v4
Expand All @@ -136,6 +136,20 @@ jobs:
twister-out/twister.xml
twister-out/**/handler.log
twister-out/**/device.log
twister-out/coverage
- name: Code Coverage Summary Report
uses: irongut/[email protected]
with:
filename: 'twister-out/coverage/coverage.xml'
badge: true
format: 'markdown'
output: 'both'

- name: publish coverage summary
run: |
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
build-and-test_on_hw:
strategy:
Expand Down

0 comments on commit 58c646d

Please sign in to comment.