diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 091e902e..c5c6a711 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -125,6 +125,9 @@ jobs: pft: runs-on: ubuntu-20.04 container: ghcr.io/neugates/build:x86_64-main + strategy: + matrix: + plugin: [core, modbus] steps: - uses: actions/checkout@v4 @@ -144,9 +147,15 @@ jobs: pip install requests pytest -s -v tests/ft + - name: create cov report + run: | + sudo apt-get -y install lcov + mkdir -p cov_report + ./create_cov_report.sh ${{ matrix.plugin }} + - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: - gcov: true - gcov_include: include plugins src - gcov_ignore: tests simulator \ No newline at end of file + verbose: true + directory: ./cov_report/ + files: cov-${{ matrix.plugin }}.info diff --git a/create_cov_report.sh b/create_cov_report.sh new file mode 100755 index 00000000..32fd76a3 --- /dev/null +++ b/create_cov_report.sh @@ -0,0 +1,18 @@ +#!/bin/bash + + +case $1 in + (modbus) + lcov -c -d build/plugins/modbus/CMakeFiles/plugin-modbus-rtu.dir -o cov_report/cov-modbus-rtu.info + lcov -c -d build/plugins/modbus/CMakeFiles/plugin-modbus-tcp.dir -o cov_report/cov-modbus-tcp.info + cd cov_report + lcov -a cov-modbus-rtu.info -a cov-modbus-tcp.info -o cov-modbus.info;; + (core) + lcov -c -d build/CMakeFiles/neuron-base.dir/src -o cov_report/cov-neuron-base.info + lcov -c -d build/CMakeFiles/neuron.dir/src -o cov_report/cov-neuron.info + lcov -c -d build/CMakeFiles/neuron.dir/plugins/restful -o cov_report/cov-restful.info + cd cov_report + lcov -a cov-neuron-base.info -a cov-neuron.info -a cov-restful.info -o cov-core.info;; + (*) + lcov -c -d build/plugins/$1/CMakeFiles/plugin-$1.dir -o cov_report/cov-$1.info;; +esac \ No newline at end of file