Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use arduino/cpp-test-action in Unit Test CI workflow#125

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aentinger merged 1 commit intoarduino:ci-unit-testfromper1234:ci-unit-test-workflow-update
Nov 2, 2020
Merged
Changes fromall 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
39 changes: 12 additions & 27 deletions.github/workflows/unit-tests.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,41 +20,26 @@ jobs:
runs-on:ubuntu-latest

env:
BUILD_PATH:${{ github.workspace }}/test/build
COVERAGE_DATA_PATH:extras/coverage-data/coverage.info

steps:
-name:Checkout repository
uses:actions/checkout@v2

-name:Install valgrind
run:sudo apt-get --assume-yes install valgrind

-name:Run unit tests
run:|
mkdir "$BUILD_PATH"
cd "$BUILD_PATH"
# Generate makefile
cmake ..
# Compile tests
make
# Run tests and check for memory leaks
valgrind --leak-check=yes --error-exitcode=1 bin/test-ArduinoCore-API
-name:Install lcov
run:sudo apt-get --assume-yes install lcov

-name:Report code coverage
run:|
cd "$BUILD_PATH"
lcov --directory . --capture --output-file coverage.info
# Remove external files from coverage data
lcov --quiet --remove coverage.info '*/test/*' '/usr/*' --output-file coverage.info
# Print coverage report in the workflow log
lcov --list coverage.info
# See: https://github.com/arduino/cpp-test-action/blob/main/README.md
-uses:arduino/cpp-test-action@main
with:
source-path:test
build-path:test/build
runtime-path:test/build/bin/test-ArduinoCore-API
coverage-exclude-paths:|
- '*/test/*'
- '/usr/*'
coverage-data-path:${{ env.COVERAGE_DATA_PATH }}

# See: https://github.com/codecov/codecov-action/blob/master/README.md
-name:Upload coverage report to Codecov
uses:codecov/codecov-action@v1
with:
file:${{ env.BUILD_PATH }}/coverage.info
file:${{ env.COVERAGE_DATA_PATH }}
fail_ci_if_error:true

[8]ページ先頭

©2009-2025 Movatter.jp