Merge pull request #8 from pge23-24/main #10
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
name: ROS2 Test Workflow | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
WORKSPACE: "vision_ws" | |
ROS_DISTRO: "foxy" | |
BLACKLIST: "py_pubsub" | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
container: | |
image: cario360/ros2 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup ROS Environment | |
run: | | |
echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc | |
source ~/.bashrc | |
shell: bash | |
- name: Install Dependencies | |
run: | | |
apt-get update | |
apt-get install -y python3-colcon-common-extensions | |
shell: bash | |
- name: Build | |
run: | | |
cd $WORKSPACE | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
colcon build --packages-skip $BLACKLIST | |
shell: bash | |
- name: Run Tests | |
run: | | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
cd $WORKSPACE | |
colcon test --packages-skip $BLACKLIST | |
colcon test-result --all | |
shell: bash |