MAVSDK tests: Enable coverage testing

This enables minimal coverage testing for multicopters.
This commit is contained in:
Lorenz Meier
2020-01-25 16:06:33 +01:00
parent dadcee1a5d
commit 06db4b9227
2 changed files with 56 additions and 4 deletions
+26 -4
View File
@@ -10,13 +10,35 @@ jobs:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
# see https://github.com/actions/checkout/issues/14
- name: disable the keychain credential helper
run: git config --global credential.helper ""
- name: enable the local store credential helper
run: git config --global --add credential.helper store
- name: add credential
run: echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials
- name: tell git to use https instead of ssh whenever it encounters it
run: 'git config --global url."https://github.com/".insteadof git@github.com:'
- name: get submodules
run: 'git submodule update --init --recursive'
- name: Set Python 3 as default
run: update-alternatives --install /usr/bin/python python /usr/bin/python3 10
- name: Install psutil
run: pip3 install psutil
# TODO: disabled 2019-01-09 due to failures
# - name: Run simulation tests
# run: make tests_integration_coverage
- name: Upload coverage to Codecov
# - name: Download newer mavsdk
# run: git clone https://github.com/mavlink/MAVSDK.git && cd MAVSDK && git submodule init && git submodule update && mkdir -p build/default
# - name: Build newer mavsdk
# run: mkdir -p MAVSDK/build/default && cd MAVSDK/build/default && cmake ../.. && make -j4 && make install
- name: Run Coverage Tests
run: make tests_integration_coverage
- name: Upload coverage information to Coveralls
uses: coverallsapp/github-action@master
with:
path-to-lcov: coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage information to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavsdk
file: coverage/lcov.info
+30
View File
@@ -0,0 +1,30 @@
codecov:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: "70...100"
status:
project: yes
patch: yes
changes: no
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: no
# fixes:
# - "platforms/::./platforms/"
# - "src/::./src/"
# - "mavlink/::./mavlink/"