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)