Skip to content

Commit

Permalink
feat: add "ROS 2 Workspace Test" sub-action (#43)
Browse files Browse the repository at this point in the history
* feat: add ROS 2 Workspace test sub-action

* refactor: use `test` sub-action in the main action

* ci: add Test step in the Individual Setup and Build job and rename it
  • Loading branch information
threeal authored Nov 3, 2023
1 parent 47c28ed commit bae6307
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
push:
branches: [main]
jobs:
individual-setup-build:
name: Individual Setup and build
individual-setup-build-test:
name: Individual Setup, Build and Test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -36,6 +36,11 @@ jobs:
with:
distro: ${{ matrix.distro }}

- name: Test workspace
uses: ./test
with:
distro: ${{ matrix.distro }}

setup-build-test:
name: Setup, Build, and Test
runs-on: ubuntu-22.04
Expand Down
5 changes: 1 addition & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@ runs:

- uses: ichiro-its/ros2-ws-action/build@18f8d40805c2668f07b836763824d99bb6e33f9b

- shell: bash
run: |
source install/setup.bash
colcon test --event-handlers console_cohesion+ --pytest-with-coverage --return-code-on-test-failure
- uses: ichiro-its/ros2-ws-action/test@3aa0cc0847b20cb0b907952964d5c4e3594c1924
13 changes: 13 additions & 0 deletions test/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: ROS 2 Workspace Test
description: Test packages in a ROS 2 workspace
author: ICHIRO ITS
branding:
icon: activity
color: gray-dark
runs:
using: composite
steps:
- shell: bash
run: |
source install/setup.bash
colcon test --event-handlers console_cohesion+ --pytest-with-coverage --return-code-on-test-failure

0 comments on commit bae6307

Please sign in to comment.