-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,22 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
name: test | ||
on: push | ||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ros_distribution: | ||
- humble | ||
|
||
container: | ||
image: ${{ matrix.docker_image }} | ||
|
||
runs-on: ubuntu-22.04 | ||
container: ryuichiueda/ubuntu22.04-ros2:latest | ||
steps: | ||
- name: Setup directories | ||
run: mkdir -p ros_ws/src | ||
|
||
- name: Checkout the code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ros_ws/src | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Setup ROS environment | ||
uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: ${{ matrix.ros_distribution }} | ||
|
||
required-ros-distributions: humble | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y python3-colcon-common-extensions | ||
- name: Build the workspace | ||
run: | | ||
cd ros_ws | ||
colcon build --symlink-install | ||
- name: Run tests | ||
run: | | ||
cd ros_ws | ||
colcon test --packages-select keyboard_teleop | ||
- name: Test Results | ||
sudo apt install -y python3-colcon-common-extensions python3-rosdep python3-pip | ||
pip install rclpy geometry_msgs sshkeyboard pytest | ||
- name: Run tests with pytest | ||
run: | | ||
colcon test-result --verbose | ||
cd /root/ros2_ws/src/keyboard_teleop/test | ||
pytest --maxfail=1 --disable-warnings -q | ||