Skip to content

Commit

Permalink
ci: use sparse checkout in each job of Test workflow (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal authored Nov 2, 2023
1 parent f3ed0d7 commit 40f2b9b
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ jobs:
repository: ros2/examples
ref: ${{ matrix.ros2-distro }}
path: examples

- name: Only test some packages
run: |
mv examples/rclcpp/topics cpptopics
mv examples/rclpy/topics pytopics
rm -rf examples
sparse-checkout: |
rclcpp/topics
rclpy/topics
- name: Test the action
uses: ./
Expand All @@ -84,11 +81,10 @@ jobs:
repository: ros2/examples
ref: iron
path: examples
sparse-checkout: rclcpp/topics/minimal_publisher

- name: Adjust packages
run: |
mv examples/rclcpp/topics/minimal_publisher .
rm -rf examples minimal_publisher/lambda.cpp
run: rm examples/rclcpp/topics/minimal_publisher/lambda.cpp

- name: Test the action
id: action
Expand All @@ -112,11 +108,10 @@ jobs:
repository: ros2/examples
ref: iron
path: examples
sparse-checkout: rclcpp/topics/minimal_publisher

- name: Adjust packages
run: |
mv examples/rclcpp/topics/minimal_publisher .
sed -i 's/return 0;/int unused; return 0;/g' minimal_publisher/lambda.cpp
run: sed -i 's/return 0;/int unused ;;;; return 0;/g' examples/rclcpp/topics/minimal_publisher/lambda.cpp

- name: Test the action
id: action
Expand Down

0 comments on commit 40f2b9b

Please sign in to comment.