From 11cb9114f836afe080b02e102c8de3a4228bebfc Mon Sep 17 00:00:00 2001 From: Stefania Pedrazzi Date: Tue, 6 Jun 2023 09:11:50 +0200 Subject: [PATCH] Fix tests on master branch (#438) * Setup for mobile_manipulation only when testing the package * Re-enable mobile manipulation test * Update tests_suite.yml * Update tests_suite_develop.yml * Debug just 2 tests * Update tests_suite.yml * Update tests_suite_develop.yml --- .github/workflows/test_packages.yml | 3 +-- .github/workflows/tests_suite.yml | 14 ++++++++++---- .github/workflows/tests_suite_develop.yml | 23 ++++++++++++++++------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_packages.yml b/.github/workflows/test_packages.yml index aa9e6ce379..3a13dd4521 100644 --- a/.github/workflows/test_packages.yml +++ b/.github/workflows/test_packages.yml @@ -54,7 +54,7 @@ jobs: # - perception/object_detection_3d # passes, but disabled due to free() crash - perception/facial_expression_recognition - simulation/human_model_generation - #- control/mobile_manipulation + - control/mobile_manipulation #- control/single_demo_grasp #- planning/end_to_end_planning - control/multi_object_search @@ -129,4 +129,3 @@ jobs: docker run --name toolkit -i opendr/opendr-toolkit:cpu_v2.1.0 bash docker start toolkit docker exec -i toolkit bash -c "source bin/activate.sh && source tests/sources/tools/control/mobile_manipulation/run_ros.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}" - diff --git a/.github/workflows/tests_suite.yml b/.github/workflows/tests_suite.yml index 06840c4a23..13c5c6521c 100644 --- a/.github/workflows/tests_suite.yml +++ b/.github/workflows/tests_suite.yml @@ -83,7 +83,7 @@ jobs: # - perception/object_detection_3d # passes, but disabled due to free() crash - perception/facial_expression_recognition - simulation/human_model_generation - # - control/mobile_manipulation + - control/mobile_manipulation - control/single_demo_grasp - planning/end_to_end_planning - control/multi_object_search @@ -106,7 +106,9 @@ jobs: if [ ${{ matrix.package }} = "ctests" ]; then make ctests else - source tests/sources/tools/control/mobile_manipulation/run_ros.sh + if [[ ${{ matrix.package }} == "control/mobile_manipulation" || ${{ matrix.package }} == "planning/end_to_end_planning" ]]; then + source tests/sources/tools/control/mobile_manipulation/run_ros.sh + fi python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }} fi build-wheel: @@ -382,7 +384,7 @@ jobs: # - perception/object_detection_3d # passes, but disabled due to free() crash - perception/facial_expression_recognition - simulation/human_model_generation - # - control/mobile_manipulation + - control/mobile_manipulation - control/single_demo_grasp - planning/end_to_end_planning - control/multi_object_search @@ -397,7 +399,11 @@ jobs: docker load < ./artifact/docker-artifact/cpu_test.zip docker run --name toolkit -i opendr/opendr-toolkit:cpu_test bash docker start toolkit - docker exec -i toolkit bash -c "source bin/activate.sh && source tests/sources/tools/control/mobile_manipulation/run_ros.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}" + if [[ ${{ matrix.package }} == "control/mobile_manipulation" || ${{ matrix.package }} == "planning/end_to_end_planning" ]]; then + docker exec -i toolkit bash -c "source bin/activate.sh && source tests/sources/tools/control/mobile_manipulation/run_ros.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}" + else + docker exec -i toolkit bash -c "source bin/activate.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}" + fi delete-docker-artifacts: needs: [build-docker, test-docker] if: ${{ always() }} diff --git a/.github/workflows/tests_suite_develop.yml b/.github/workflows/tests_suite_develop.yml index 3d302abd3e..84910016be 100644 --- a/.github/workflows/tests_suite_develop.yml +++ b/.github/workflows/tests_suite_develop.yml @@ -18,6 +18,7 @@ jobs: test-sources: if: ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || github.event_name == 'schedule' }} strategy: + fail-fast: false matrix: os: [ubuntu-20.04, macos-11] include: @@ -83,7 +84,7 @@ jobs: # - perception/object_detection_3d # passes, but disabled due to free() crash - perception/facial_expression_recognition - simulation/human_model_generation - # - control/mobile_manipulation + - control/mobile_manipulation - control/single_demo_grasp - planning/end_to_end_planning - control/multi_object_search @@ -107,7 +108,9 @@ jobs: if [ ${{ matrix.package }} = "ctests" ]; then make ctests else - source tests/sources/tools/control/mobile_manipulation/run_ros.sh + if [[ ${{ matrix.package }} == "control/mobile_manipulation" || ${{ matrix.package }} == "planning/end_to_end_planning" ]]; then + source tests/sources/tools/control/mobile_manipulation/run_ros.sh + fi python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }} fi build-wheel: @@ -195,10 +198,10 @@ jobs: # - perception/object_detection_3d # passes, but disabled due to free() crash - perception/facial_expression_recognition - simulation/human_model_generation + #- control/multi_object_search #- control/mobile_manipulation #- control/single_demo_grasp #- planning/end_to_end_planning - #- control/multi_object_search runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -349,8 +352,10 @@ jobs: # install the package itself python3 -m pip install ./artifact/wheel-artifact/opendr-toolkit-$package-*.tar.gz fi - - cd src/opendr/perception/object_detection_2d/retinaface; make; cd $OPENDR_HOME + + if [[ ${{ matrix.package }} == "perception/object_detection_2d/retinaface" ]]; then + cd src/opendr/perception/object_detection_2d/retinaface; make; cd $OPENDR_HOME + fi # run the test python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }} @@ -393,7 +398,7 @@ jobs: # - perception/object_detection_3d # passes, but disabled due to free() crash - perception/facial_expression_recognition - simulation/human_model_generation - # - control/mobile_manipulation + - control/mobile_manipulation - control/single_demo_grasp - planning/end_to_end_planning - control/multi_object_search @@ -408,7 +413,11 @@ jobs: docker load < ./artifact/docker-artifact/cpu_test.zip docker run --name toolkit -i opendr/opendr-toolkit:cpu_test bash docker start toolkit - docker exec -i toolkit bash -c "source bin/activate.sh && source tests/sources/tools/control/mobile_manipulation/run_ros.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}" + if [[ ${{ matrix.package }} == "control/mobile_manipulation" || ${{ matrix.package }} == "planning/end_to_end_planning" ]]; then + docker exec -i toolkit bash -c "source bin/activate.sh && source tests/sources/tools/control/mobile_manipulation/run_ros.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}" + else + docker exec -i toolkit bash -c "source bin/activate.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}" + fi delete-docker-artifacts: needs: [build-docker, test-docker] if: ${{ always() }}