diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index efc42380..27e59b87 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -33,7 +33,7 @@ jobs: with: path: . key: ${{ runner.os }}-build-${{ github.run_number }} - run-tests: + test-scenario-execution: needs: [build-and-cache] runs-on: intellabs-01 container: @@ -56,7 +56,6 @@ jobs: export ROS_DOMAIN_ID=2 colcon test --packages-select \ scenario_execution \ - scenario_execution_ros \ scenario_execution_gazebo \ scenario_coverage \ --event-handlers console_direct+ \ @@ -64,16 +63,46 @@ jobs: --pytest-args \ --junit-xml=TEST.xml # Add "--capture=no" to see output of tests - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@f355d34d53ad4e7f506f699478db2dd71da9de5f #v2.15.1 + - name: Upload result + uses: actions/upload-artifact@ef09cdac3e2d3e60d8ccadda691f4f1cec5035cb if: always() with: - check_run: false - files: | - scenario_execution//TEST.xml - scenario_execution_ros//TEST.xml - scenario_execution_gazebo//TEST.xml - scenario_coverage//TEST.xml + name: test-scenario-execution + path: ./**/TEST.xml + test-scenario-execution-ros: + needs: [build-and-cache] + runs-on: intellabs-01 + container: + image: ghcr.io/intellabs/scenario-execution:humble + credentials: + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Restore cache + uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + with: + key: ${{ runner.os }}-build-${{ github.run_number }} + path: . + - name: Test + shell: bash + run: | + source /opt/ros/humble/setup.bash + source install/setup.bash + export -n CYCLONEDDS_URI + export ROS_DOMAIN_ID=2 + colcon test --packages-select \ + scenario_execution_ros \ + --event-handlers console_direct+ \ + --return-code-on-test-failure \ + --pytest-args \ + --junit-xml=TEST.xml + # Add "--capture=no" to see output of tests + - name: Upload result + uses: actions/upload-artifact@ef09cdac3e2d3e60d8ccadda691f4f1cec5035cb + if: always() + with: + name: test-scenario-execution-ros + path: ./**/TEST.xml scenario-files-validation: needs: [build-and-cache] runs-on: intellabs-01 @@ -279,7 +308,7 @@ jobs: name: test-example-multirobot-result path: test_example_multirobot/test.xml publish-scenario-results: - needs: [run-tests, scenario-files-validation, test-example-scenario, test-example-library, test-example-variation, test-example-nav2, test-example-simulation, test-example-multirobot] + needs: [test-scenario-execution, test-scenario-execution-ros, scenario-files-validation, test-example-scenario, test-example-library, test-example-variation, test-example-nav2, test-example-simulation, test-example-multirobot] runs-on: intellabs-01 if: ${{ always() }} steps: @@ -295,6 +324,9 @@ jobs: action_fail: true comment_mode: always files: | + downloaded-artifacts/test-scenario-execution/scenario_execution/TEST.xml + downloaded-artifacts/test-scenario-execution-ros/scenario_execution_ros/TEST.xml + downloaded-artifacts/test-scenario-execution/scenario_coverage/TEST.xml downloaded-artifacts/test-example-scenario-result/test.xml downloaded-artifacts/test-example-library-result/test.xml downloaded-artifacts/test-example-variation-result/test.xml