From bcf6e6ffea304baf14aaa0f6b20fe80a1812fccd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:36:47 +0000 Subject: [PATCH 1/2] Initial plan From 27b7a2a51ce36e99d5a9b54c51fd282f19856a6d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:46:09 +0000 Subject: [PATCH 2/2] Fix integration tests failing in CI by conditionally skipping ROS-dependent tests Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com> --- .github/workflows/integration.yml | 2 ++ CHANGELOG.md | 4 ++++ docs/examples/conftest.py | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e1c5e005e0..c3d66ecaf4 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -35,6 +35,8 @@ jobs: run: | pytest --doctest-modules pytest docs + env: + COMPAS_FAB_INTEGRATION_TESTS: 1 - name: Tear down docker containers run: | docker-compose -f "tests/integration_setup/docker-compose.yml" down diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a3d431e56..c047bb8798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +### Fixed + +* Fixed integration tests failing in CI by adding environment variable check to skip ROS-dependent tests when ROS backend is not available. + ## [1.1.2] 2025-10-31 diff --git a/docs/examples/conftest.py b/docs/examples/conftest.py index b00d9f97ff..68c83f56c7 100644 --- a/docs/examples/conftest.py +++ b/docs/examples/conftest.py @@ -10,12 +10,32 @@ LITERALPYTHON_START = re.compile(r"\.\.\s*literalinclude\s*::(.*\.py)") LITERALPYTHON_END = re.compile(r"(\n\Z|\n(?=\S))") + +# Files that should always be ignored IGNORES = [ "files/01_ros_*.py", "files/03_robot_rhino*.py", "files/04_cartesian_path_analytic_pybullet.py", ] +# Files that require ROS backend - only run in integration tests +ROS_REQUIRED_FILES = [ + "files/02_robot_model.py", + "files/02_robot_model_urdf.py", + "files/03_forward_kinematics.py", + "files/03_inverse_kinematics.py", + "files/03_iter_inverse_kinematics.py", + "files/04_plan_cartesian_motion.py", + "files/04_plan_motion.py", + "files/05_add_collision_mesh.py", + "files/05_append_collision_meshes.py", + "files/05_attach_ee.py", +] + +# Add ROS-required files to ignores if not running integration tests +if not os.environ.get("COMPAS_FAB_INTEGRATION_TESTS"): + IGNORES.extend(ROS_REQUIRED_FILES) + def evaluate_literalinclude_python_blocks(block_match): source_path = os.path.dirname(block_match.path)