File tree 1 file changed +10
-21
lines changed
1 file changed +10
-21
lines changed Original file line number Diff line number Diff line change @@ -19,34 +19,23 @@ jobs:
19
19
runs-on : ubuntu-latest
20
20
21
21
env :
22
- BUILD_PATH : " ${{ github.workspace }}/ extras/test/build "
22
+ COVERAGE_DATA_PATH : extras/coverage-data/coverage.info
23
23
24
24
steps :
25
25
- name : Checkout
26
26
uses : actions/checkout@v2
27
27
28
- - name : Install valgrind
29
- run : |
30
- sudo apt-get install valgrind
31
-
32
- - name : Run unit tests
33
- run : |
34
- mkdir "$BUILD_PATH"
35
- cd "$BUILD_PATH"
36
- cmake ..
37
- make
38
- valgrind --leak-check=yes --error-exitcode=1 bin/testArduinoIoTCloud
39
-
40
- - name : Check code coverage
41
- run : |
42
- cd "$BUILD_PATH"
43
- sudo apt-get --assume-yes install lcov > /dev/null
44
- lcov --directory . --capture --output-file coverage.info
45
- lcov --quiet --remove coverage.info '*/extras/test/*' '/usr/*' '*/src/cbor/lib/*' --output-file coverage.info
46
- lcov --list coverage.info
28
+ - uses : arduino/cpp-test-action@main
29
+ with :
30
+ runtime-path : extras/test/build/bin/testArduinoIoTCloud
31
+ coverage-exclude-paths : |
32
+ - '*/extras/test/*'
33
+ - '/usr/*'
34
+ - '*/src/cbor/lib/*'
35
+ coverage-data-path : ${{ env.COVERAGE_DATA_PATH }}
47
36
48
37
- name : Upload coverage report to Codecov
49
38
uses : codecov/codecov-action@v1
50
39
with :
51
- file : " ${{ env.BUILD_PATH }}/coverage.info "
40
+ file : " ${{ env.COVERAGE_DATA_PATH }}"
52
41
fail_ci_if_error : true
You can’t perform that action at this time.
0 commit comments