-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ros2 unit test workflow #471
Changes from 25 commits
bf09553
5c2c325
ca1b2b3
ee565fa
670ad21
a6300af
064c730
42b6bfc
fe4e650
7d43459
450925d
efbf7be
acb8ddd
5741f32
435cda8
fbe010a
c247ca1
134b1b2
089b5de
c8373a0
112a313
c1acb77
87aeb23
bc7950b
1fdc675
bcf68eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
name: Run unit tests | ||
|
||
on: | ||
push: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test: | ||
name: Run unit tests ${{ matrix.build_type }} build type | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
build_type: [simulation, hardware] | ||
|
||
env: | ||
HUSARION_ROS_BUILD_TYPE: ${{ matrix.build_type }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ros-tooling/setup-ros@v0.7 | ||
with: | ||
use-ros2-testing: true | ||
|
||
- name: Build and test | ||
uses: ros-tooling/action-ros-ci@v0.3 | ||
with: | ||
vcs-repo-file-url: ${{ github.workspace }}/husarion_ugv/${{ env.HUSARION_ROS_BUILD_TYPE }}_deps.repos | ||
target-ros2-distro: humble | ||
colcon-defaults: | | ||
{ | ||
"build": { | ||
"packages-up-to": ["husarion_ugv"], | ||
"cmake-args": ["-DCMAKE_BUILD_TYPE=Release"] | ||
}, | ||
"test": { | ||
"packages-up-to": ["husarion_ugv"] | ||
} | ||
} | ||
|
||
continue-on-error: true | ||
|
||
- name: Retry Build and test (if failed) | ||
if: steps.build_test_1.outcome == 'failure' | ||
uses: ros-tooling/action-ros-ci@v0.3 | ||
with: | ||
vcs-repo-file-url: ${{ github.workspace }}/husarion_ugv/${{ env.HUSARION_ROS_BUILD_TYPE }}_deps.repos | ||
target-ros2-distro: humble | ||
colcon-defaults: | | ||
{ | ||
"build": { | ||
"packages-up-to": ["husarion_ugv"], | ||
"cmake-args": ["-DCMAKE_BUILD_TYPE=Release"] | ||
}, | ||
"test": { | ||
"packages-up-to": ["husarion_ugv"] | ||
} | ||
} | ||
Comment on lines
+47
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix the retry condition step ID reference. The condition references an undefined step ID Apply this diff to fix the step ID reference: - name: Build and test
+ id: build_test_1
uses: ros-tooling/action-ros-ci@v0.3
🧰 Tools🪛 actionlint (1.7.4)47-47: property "build_test_1" is not defined in object type {} (expression) |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Reconsider using
continue-on-error: true
.Using
continue-on-error: true
might hide build or test failures. Consider removing it since you already have a retry mechanism in place.- continue-on-error: true