PX4-Autopilot/.github/workflows/sitl_tests_coverage.yml
Julian Oes 00728dab18 workflows: build pull requests and master
With this change pull requests from forks are also built.
We yet need to verify if tags/releases are built or if we need to
specify the tags as well.
2020-01-28 22:09:50 -05:00

53 lines
2.0 KiB
YAML

name: SITL Tests (Code Coverage)
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-simulation-bionic:2020-01-13
steps:
- 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
# - 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
# We are not actively using coveralls, but we keep the config
# in case the service should be re-enabled later
# - 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