From ab299a47b1b337a262330299438981542faab9b4 Mon Sep 17 00:00:00 2001 From: Lokesh-Ramina Date: Wed, 12 Jun 2024 15:54:03 -0700 Subject: [PATCH] workflow: Added Carbonix Param Range Check yml. This will execute the Tools/Carbonix_scripts/param_auto_test.py file. SW-159 --- .github/workflows/cx_param_range_check.yml | 168 +++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 .github/workflows/cx_param_range_check.yml diff --git a/.github/workflows/cx_param_range_check.yml b/.github/workflows/cx_param_range_check.yml new file mode 100644 index 0000000000..f264d37dd8 --- /dev/null +++ b/.github/workflows/cx_param_range_check.yml @@ -0,0 +1,168 @@ +name: Cube Param Validation +#on push and pull request all branches +on: + push: + branches: + - CxPilot + - CxPilot-* + - master + paths-ignore: + # remove other vehicles + - 'AntennaTracker/**' + - 'Blimp/**' + # remove non SITL HAL + - 'libraries/AP_HAL_ChibiOS/**' + - 'libraries/AP_HAL_ESP32/**' + # remove non SITL directories + - 'Tools/AP_Bootloader/**' + - 'Tools/AP_Periph/**' + - 'Tools/CHDK-Script/**' + - 'Tools/CPUInfo/**' + - 'Tools/CodeStyle/**' + - 'Tools/FilterTestTool/**' + - 'Tools/Frame_params/**' + - 'Tools/GIT_Test/**' + - 'Tools/Hello/**' + - 'Tools/IO_Firmware/**' + - 'Tools/Linux_HAL_Essentials/**' + - 'Tools/LogAnalyzer/**' + - 'Tools/Pozyx/**' + - 'Tools/PrintVersion.py' + - 'Tools/Replay/**' + - 'Tools/UDP_Proxy/**' + - 'Tools/Vicon/**' + - 'Tools/bootloaders/**' + - 'Tools/completion/**' + - 'Tools/debug/**' + - 'Tools/environment_install/**' + - 'Tools/geotag/**' + - 'Tools/gittools/**' + - 'Tools/mavproxy_modules/**' + - 'Tools/simulink/**' + - 'Tools/vagrant/**' + # Discard python file from Tools/scripts as not used + - 'Tools/scripts/**.py' + - 'Tools/scripts/build_sizes/**' + - 'Tools/scripts/build_tests/**' + - 'Tools/scripts/CAN/**' + - 'Tools/scripts/signing/**' + # Remove autotest + - 'Tools/autotest/**' + # Remove markdown files as irrelevant + - '**.md' + # Remove dotfile at root directory + - './.dir-locals.el' + - './.dockerignore' + - './.editorconfig' + - './.flake8' + - './.gitattributes' + - './.github' + - './.gitignore' + - './.pre-commit-config.yaml' + - './.pydevproject' + - './.valgrind-suppressions' + - './.valgrindrc' + - 'Dockerfile' + - 'Vagrantfile' + - 'Makefile' + # Remove some directories check + - '.vscode/**' + - '.github/ISSUE_TEMPLATE/**' + + pull_request: + paths-ignore: + # remove other vehicles + - 'AntennaTracker/**' + - 'Blimp/**' + # remove non SITL HAL + - 'libraries/AP_HAL_ChibiOS/**' + - 'libraries/AP_HAL_ESP32/**' + # remove non SITL directories + - 'Tools/AP_Bootloader/**' + - 'Tools/AP_Periph/**' + - 'Tools/bootloaders/**' + - 'Tools/CHDK-Script/**' + - 'Tools/CodeStyle/**' + - 'Tools/completion/**' + - 'Tools/CPUInfo/**' + - 'Tools/debug/**' + - 'Tools/environment_install/**' + - 'Tools/FilterTestTool/**' + - 'Tools/Frame_params/**' + - 'Tools/geotag/**' + - 'Tools/GIT_Test/**' + - 'Tools/gittools/**' + - 'Tools/Hello/**' + - 'Tools/IO_Firmware/**' + - 'Tools/Linux_HAL_Essentials/**' + - 'Tools/LogAnalyzer/**' + - 'Tools/mavproxy_modules/**' + - 'Tools/Pozyx/**' + - 'Tools/PrintVersion.py' + - 'Tools/Replay/**' + - 'Tools/simulink/**' + - 'Tools/UDP_Proxy/**' + - 'Tools/vagrant/**' + - 'Tools/Vicon/**' + # Discard python file from Tools/scripts as not used + - 'Tools/scripts/**.py' + - 'Tools/scripts/build_sizes/**' + - 'Tools/scripts/build_tests/**' + - 'Tools/scripts/CAN/**' + - 'Tools/scripts/signing/**' + # Remove autotest + - 'Tools/autotest/**' + # Remove markdown files as irrelevant + - '**.md' + # Remove dotfile at root directory + - './.dir-locals.el' + - './.dockerignore' + - './.editorconfig' + - './.flake8' + - './.gitattributes' + - './.github' + - './.gitignore' + - './.pre-commit-config.yaml' + - './.pydevproject' + - './.valgrind-suppressions' + - './.valgrindrc' + - 'Dockerfile' + - 'Vagrantfile' + - 'Makefile' + # Remove some directories check + - '.vscode/**' + - '.github/ISSUE_TEMPLATE/**' + + workflow_dispatch: + +concurrency: + group: ci-${{github.workflow}}-${{ github.ref }} + cancel-in-progress: true + +jobs: + run-python-script: + runs-on: ubuntu-20.04 + + steps: + #repo 1 + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: 3.8.10 # Choose your Python version + + - name: Setup Environment + run: | + pip install future lxml pymavlink MAVProxy pexpect flake8==3.7.9 geocoder empy configparser==5.0.0 click==7.1.2 decorator==4.4.2 + + - name: Run Param XML File Generate + run: | + cd Tools/autotest/param_metadata + ./param_parse.py --vehicle ArduPlane --format all + + - name: Run Param Script + run: | + python Tools/Carbonix_scripts/param_auto_test.py \ No newline at end of file