mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
MAVSDK tests: Enable coverage testing
This enables minimal coverage testing for multicopters.
This commit is contained in:
@@ -10,13 +10,35 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.ACCESS_TOKEN }}
|
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
|
- name: Install psutil
|
||||||
run: pip3 install psutil
|
run: pip3 install psutil
|
||||||
# TODO: disabled 2019-01-09 due to failures
|
# - name: Download newer mavsdk
|
||||||
# - name: Run simulation tests
|
# run: git clone https://github.com/mavlink/MAVSDK.git && cd MAVSDK && git submodule init && git submodule update && mkdir -p build/default
|
||||||
# run: make tests_integration_coverage
|
# - name: Build newer mavsdk
|
||||||
- name: Upload coverage to Codecov
|
# 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
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
flags: mavsdk
|
flags: mavsdk
|
||||||
|
file: coverage/lcov.info
|
||||||
|
|||||||
+30
@@ -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/"
|
||||||
Reference in New Issue
Block a user