-
Notifications
You must be signed in to change notification settings - Fork 26
191 lines (162 loc) · 4.96 KB
/
test-composite-actions.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
name: test-composite-actions
on:
pull_request:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
test-register-autonomoustuff-repository:
runs-on: ubuntu-22.04
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-22.04
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-22.04
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-22.04
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-22.04
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
container:
- ros:humble
- ghcr.io/autowarefoundation/autoware:latest-universe-devel
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