mirror of
https://github.com/emqx/neuron.git
synced 2026-10-23 10:22:32 +08:00
Merge pull request #1653 from ZhouBox/main
ci:split pytest in same jobs
This commit is contained in:
@@ -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
|
||||
verbose: true
|
||||
directory: ./cov_report/
|
||||
files: cov-${{ matrix.plugin }}.info
|
||||
|
||||
Executable
+18
@@ -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
|
||||
Reference in New Issue
Block a user