From 9e6ab7d895e6ddde11dc0258023911a93e9e9bd6 Mon Sep 17 00:00:00 2001 From: hxy7yx <1595670487@qq.com> Date: Tue, 19 Aug 2025 23:59:16 -0700 Subject: [PATCH] move unused drivers to manual check workflow --- .github/workflows/check.yml | 8 +-- .github/workflows/manual-unused-plugins.yml | 71 +++++++++++++++++++++ codecov.yaml | 1 + 3 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/manual-unused-plugins.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7cc404fcd..3fd583ad7 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -107,7 +107,7 @@ jobs: needs: [build] strategy: matrix: - plugin: [core, ekuiper, modbus, mqtt, azure, metrics, launch] + plugin: [core, ekuiper, modbus, mqtt, metrics] steps: - uses: actions/checkout@v4 with: @@ -146,16 +146,11 @@ jobs: pytest -s -v tests/ft/driver/"test_modbus.py" elif [ "${{ matrix.plugin }}" = "mqtt" ]; then pytest -s -v tests/ft/app/"test_mqtt.py" - elif [ "${{ matrix.plugin }}" = "azure" ]; then - pytest -s -v tests/ft/app/"test_azure.py" - #elif [ "${{ matrix.plugin }}" = "launch" ]; then - #pytest -s -v tests/ft/login else pytest -s -v tests/ft/metrics/"test_metrics.py" fi - name: create cov report - if: ${{ matrix.plugin != 'launch' }} run: | sudo apt-get update sudo apt-get -y install lcov @@ -164,7 +159,6 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 - if: ${{ matrix.plugin != 'launch' }} with: verbose: true fail_ci_if_error: true diff --git a/.github/workflows/manual-unused-plugins.yml b/.github/workflows/manual-unused-plugins.yml new file mode 100644 index 000000000..7be14bf20 --- /dev/null +++ b/.github/workflows/manual-unused-plugins.yml @@ -0,0 +1,71 @@ +name: manual check + +on: + workflow_dispatch: + inputs: + plugins: + description: 'Comma separated list of plugins to test (default: all unused plugins)' + required: false + default: 'azure,launch' + +jobs: + build: + runs-on: ubuntu-24.04 + container: ghcr.io/neugates/build:x86_64-main + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: compile + run: | + git config --global --add safe.directory $(pwd) + mkdir -p build && cd build + cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-linux-gnu.cmake + make -j4 + + - uses: actions/upload-artifact@v4 + with: + name: neuron-build-unused-plugins + path: | + build + + unused_plugins_test: + runs-on: ubuntu-24.04 + container: ghcr.io/neugates/build:x86_64-main + needs: [build] + strategy: + matrix: + plugin: [azure, launch] + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: setup dependencies + run: | + sudo apt-get install -y mosquitto + pip install -U pytest requests prometheus-client gmqtt pynng sniffio + sudo apt-get install -y socat + + - uses: actions/download-artifact@v4 + with: + name: neuron-build-unused-plugins + path: ./build + + - name: function test + run: | + chmod -R +x ./build/ + cd build + cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-linux-gnu.cmake + cd .. + if [ "${{ matrix.plugin }}" = "azure" ]; then + pytest -s -v tests/ft/app/"test_azure.py" + elif [ "${{ matrix.plugin }}" = "launch" ]; then + pytest -s -v tests/ft/login + fi + + - name: Test completed + run: | + echo "Testing for ${{ matrix.plugin }} completed successfully" \ No newline at end of file diff --git a/codecov.yaml b/codecov.yaml index 6a83fdef2..0586bfef7 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -1,5 +1,6 @@ ignore: - "src/otel/*.pb-c.c" + - "plugins/mqtt/azure_iot_plugin.c" coverage: status: project: