Skip to content

Commit

Permalink
chore: merge pull request #14 from ichiro-its/update-workflow-config
Browse files Browse the repository at this point in the history
Refine Workflow Configuration
  • Loading branch information
threeal authored Nov 1, 2023
2 parents 94d46d2 + b4b8f86 commit c5eaf16
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 19 deletions.
52 changes: 34 additions & 18 deletions .github/workflows/action-test.yml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
name: Action Test
name: Test
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
action-test:
runs-on: ${{ matrix.os }}
build-and-test:
name: Build and Test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
ros2-distro: humble
- os: ubuntu-22.04
ros2-distro: iron
ros2-distro: [humble, iron]
steps:
- name: Checkout this repository
uses: actions/checkout@v2.3.4
Expand Down Expand Up @@ -45,25 +42,44 @@ jobs:
name: Install
path: install

action-test-failure:
runs-on: ubuntu-20.04
strategy:
matrix:
package: [failed_build, failed_test]
failed-build:
name: Failed Build
runs-on: ubuntu-22.04
steps:
- name: Checkout this repository
uses: actions/checkout@v2.3.4

- name: Only test some packages
run: |
mv test/${{ matrix.package }} ${{ matrix.package }} || true
rm -rf examples test || true
mv test/failed_build failed_build
rm -rf examples test
- name: Test the action
id: action
continue-on-error: true
uses: ./

- name: Fails if previous step has succeeded
if: ${{ steps.action.outcome == 'success' }}
run: false

failed-test:
name: Failed Test
runs-on: ubuntu-22.04
steps:
- name: Checkout this repository
uses: actions/checkout@v2.3.4

- name: Only test some packages
run: |
mv test/failed_test failed_test
rm -rf examples test
- name: Test the action
id: failedstep
id: action
continue-on-error: true
uses: ./

- name: Fails if previous step has succeeded
if: ${{ steps.failedstep.outcome == 'success' }}
if: ${{ steps.action.outcome == 'success' }}
run: false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![latest version](https://img.shields.io/github/v/release/ichiro-its/ros2-build-and-test-action)](https://github.com/ichiro-its/ros2-build-and-test-action/releases/)
[![commits since latest version](https://img.shields.io/github/commits-since/ichiro-its/ros2-build-and-test-action/latest)](https://github.com/ichiro-its/ros2-build-and-test-action/releases/)
[![license](https://img.shields.io/github/license/ichiro-its/ros2-build-and-test-action)](./LICENSE)
[![test status](https://img.shields.io/github/workflow/status/ichiro-its/ros2-build-and-test-action/Action%20Test?label=test)](https://github.com/ichiro-its/ros2-build-and-test-action/actions)
[![test status](https://img.shields.io/github/workflow/status/ichiro-its/ros2-build-and-test-action/test.yaml?label=test&branch=main)](https://github.com/ichiro-its/ros2-build-and-test-action/actions/workflows/test.yaml)

This action could be used to build and test a [ROS 2](https://www.ros.org/) workspace from source.

Expand Down

0 comments on commit c5eaf16

Please sign in to comment.