Skip to content

test-composite-actions #1575

test-composite-actions

test-composite-actions #1575

name: test-composite-actions
on:
pull_request:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
test-register-autonomoustuff-repository:
runs-on: ubuntu-latest
container: ros:${{ matrix.rosdistro }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Run register-autonomoustuff-repository
uses: ./register-autonomoustuff-repository
with:
rosdistro: ${{ matrix.rosdistro }}
- name: Install pacmod3_msgs
run: |
sudo apt-get install -y ros-${{ matrix.rosdistro }}-pacmod3-msgs
- name: Check rosdep
run: |
rosdep update
rosdep resolve pacmod3_msgs
test-clang-tidy-empty-target:
runs-on: ubuntu-latest
container: ros:${{ matrix.rosdistro }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Run clang-tidy
uses: ./clang-tidy
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: empty_target_cmake
clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy
test-check-file-existence:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Create temporary files
run: |
touch foo
touch bar
- name: Run check-file-existence
id: check-file-existence1
uses: ./check-file-existence
with:
files: |
foo
bar
condition: and
- name: Check result
run: |
[[ "${{ steps.check-file-existence1.outputs.exists }}" == "true" ]]
- name: Run check-file-existence
id: check-file-existence2
uses: ./check-file-existence
with:
files: |
foo
bar
baz
condition: and
- name: Check result
run: |
[[ "${{ steps.check-file-existence2.outputs.exists }}" == "false" ]]
- name: Run check-file-existence
id: check-file-existence3
uses: ./check-file-existence
with:
files: foo
condition: or
- name: Check result
run: |
[[ "${{ steps.check-file-existence3.outputs.exists }}" == "true" ]]
- name: Run check-file-existence
id: check-file-existence4
uses: ./check-file-existence
with:
files: |
foo
baz
condition: or
- name: Check result
run: |
[[ "${{ steps.check-file-existence4.outputs.exists }}" == "true" ]]
test-colcon-build-and-colcon-test:
runs-on: ubuntu-latest
container: ros:${{ matrix.rosdistro }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Run colcon-build
uses: ./colcon-build
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: empty_target_cmake empty_target_python
- name: Run colcon-test
uses: ./colcon-test
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: empty_target_cmake empty_target_python
test-get-self-packages-and-get-modified-packages:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
container:
- ros:humble
- ghcr.io/autowarefoundation/autoware-universe:humble-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
- name: Workaround for https://github.com/actions/checkout/issues/766
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Modify packages
run: |
echo "" >> tests/dummy_packages/empty_target_cmake/package.xml
git add .
git commit -m "modify packages"
- name: Clear workaround
run: |
git config --global --unset safe.directory
- name: Run get-self-packages
id: get-self-packages
uses: ./get-self-packages
- name: Check result of get-self-packages
run: |
[[ "${{ steps.get-self-packages.outputs.self-packages }}" == "empty_target_cmake empty_target_python" ]]
shell: bash
- name: Run get-modified-packages
id: get-modified-packages
uses: ./get-modified-packages
with:
base-branch: main
- name: Check result of get-modified-packages
run: |
[[ "${{ steps.get-modified-packages.outputs.modified-packages }}" == "empty_target_cmake" ]]
shell: bash