add coverage run badge, extension
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: Coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
# inputs:
|
||||
# debug_enabled:
|
||||
# description: 'Run with tmate'
|
||||
# required: false
|
||||
# default: ''
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: packages
|
||||
run: sudo apt-get update && sudo apt-get install -y libmosquitto1 libmosquitto-dev
|
||||
-
|
||||
name: build
|
||||
run: cmake -Dcoverage=ON -DBUILD_TESTING=1 . && make
|
||||
-
|
||||
name: test regular
|
||||
run: cd src/lib/ebus/test && ./test_symbol && ./test_filereader && ./test_data && ./test_message
|
||||
-
|
||||
name: test contrib
|
||||
run: cd src/lib/ebus/contrib/test && ./test_contrib
|
||||
# -
|
||||
# name: setup tmate
|
||||
# uses: mxschmitt/action-tmate@v3.7
|
||||
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
|
||||
# timeout-minutes: 15
|
||||
# with:
|
||||
# limit-access-to-actor: true
|
||||
-
|
||||
name: test coverage
|
||||
run: ./test_coverage.sh
|
||||
-
|
||||
name: prepare result
|
||||
run: find . -type f -name '*.gcno' -exec bash -c "(f={}; ls -l \$f; cd \${f%/*}; gcov -pb \${f##*/})" \;
|
||||
-
|
||||
name: push result
|
||||
run: bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
Reference in New Issue
Block a user