Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,10 @@ jobs:
with:
should-run: ${{
needs.check-changes.result == 'success' &&
((needs.ros-dev.result == 'success') ||
(needs.ros-dev.result == 'skipped' &&
needs.check-changes.outputs.tests == 'true'))
(needs.check-changes.outputs.tests == 'true' ||
needs.check-changes.outputs.ros == 'true' ||
needs.check-changes.outputs.python == 'true' ||
needs.check-changes.outputs.dev == 'true')
}}
Comment on lines 151 to 157
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests run even when upstream build fails

The new condition correctly fixes the md-only PR issue, but it removes the implicit guard that the old logic provided: under the previous condition, if ros-dev explicitly failed (result != 'success' and != 'skipped'), should-run would be false. Now, if ros-dev fails but tests == 'true', tests will run with should-run=true against the fallback :dev image.

This is not necessarily wrong — the dev-image expression already handles the fallback — but it does mean CI will report test results even when the freshly built image wasn't used. Consider whether you want to surface build failures as test skips or as tests running against stale images.

cmd: "pytest && pytest -m ros" # run tests that depend on ros as well
dev-image: ros-dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true' || needs.check-changes.outputs.ros == 'true') && needs.ros-dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
Expand All @@ -165,9 +166,9 @@ jobs:
with:
should-run: ${{
needs.check-changes.result == 'success' &&
((needs.dev.result == 'success') ||
(needs.dev.result == 'skipped' &&
needs.check-changes.outputs.tests == 'true'))
(needs.check-changes.outputs.tests == 'true' ||
needs.check-changes.outputs.python == 'true' ||
needs.check-changes.outputs.dev == 'true')
}}
cmd: "pytest"
dev-image: dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true') && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
Expand All @@ -181,9 +182,9 @@ jobs:
with:
should-run: ${{
needs.check-changes.result == 'success' &&
((needs.dev.result == 'success') ||
(needs.dev.result == 'skipped' &&
needs.check-changes.outputs.tests == 'true'))
(needs.check-changes.outputs.tests == 'true' ||
needs.check-changes.outputs.python == 'true' ||
needs.check-changes.outputs.dev == 'true')
}}
cmd: "pytest -m heavy"
dev-image: dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true') && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
Expand All @@ -196,9 +197,9 @@ jobs:
with:
should-run: ${{
needs.check-changes.result == 'success' &&
((needs.dev.result == 'success') ||
(needs.dev.result == 'skipped' &&
needs.check-changes.outputs.tests == 'true'))
(needs.check-changes.outputs.tests == 'true' ||
needs.check-changes.outputs.python == 'true' ||
needs.check-changes.outputs.dev == 'true')
}}
cmd: "pytest -m lcm"
dev-image: dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true') && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
Expand All @@ -211,9 +212,9 @@ jobs:
with:
should-run: ${{
needs.check-changes.result == 'success' &&
((needs.dev.result == 'success') ||
(needs.dev.result == 'skipped' &&
needs.check-changes.outputs.tests == 'true'))
(needs.check-changes.outputs.tests == 'true' ||
needs.check-changes.outputs.python == 'true' ||
needs.check-changes.outputs.dev == 'true')
}}
cmd: "pytest -m integration"
dev-image: dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true') && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
Expand All @@ -226,9 +227,10 @@ jobs:
with:
should-run: ${{
needs.check-changes.result == 'success' &&
((needs.ros-dev.result == 'success') ||
(needs.ros-dev.result == 'skipped' &&
needs.check-changes.outputs.tests == 'true'))
(needs.check-changes.outputs.tests == 'true' ||
needs.check-changes.outputs.ros == 'true' ||
needs.check-changes.outputs.python == 'true' ||
needs.check-changes.outputs.dev == 'true')
}}
cmd: "MYPYPATH=/opt/ros/humble/lib/python3.10/site-packages mypy dimos"
dev-image: ros-dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true' || needs.check-changes.outputs.ros == 'true') && needs.ros-dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
Expand Down
Loading