Skip to content

Commit ffdcba2

Browse files
authored
Update CI to report tests results (#420)
* Change branch for tests in eprosima ci Signed-off-by: Raul Sanchez-Mateos <[email protected]> * Force tests to fail Signed-off-by: Raul Sanchez-Mateos <[email protected]> * Take test results path from action output Signed-off-by: Raul Sanchez-Mateos <[email protected]> * Use external action from eProsima-CI Signed-off-by: Raul Sanchez-Mateos <[email protected]> * Undo changes to force tests to fail Signed-off-by: Raul Sanchez-Mateos <[email protected]> * Remove not needed permissions Signed-off-by: Raul Sanchez-Mateos <[email protected]> * Rename test reports Signed-off-by: Raul Sanchez-Mateos <[email protected]> * Only list failed tests Signed-off-by: Raul Sanchez-Mateos <[email protected]> * Update actions branch to main Signed-off-by: Raul Sanchez-Mateos <[email protected]> --------- Signed-off-by: Raul Sanchez-Mateos <[email protected]>
1 parent cd3d7ef commit ffdcba2

File tree

1 file changed

+44
-5
lines changed

1 file changed

+44
-5
lines changed

.github/workflows/test.yml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,24 @@ jobs:
107107
secret_token: ${{ secrets.GITHUB_TOKEN }}
108108

109109
- name: Compile and run tests
110-
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
110+
id: compile_and_test
111+
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@main
111112
with:
112113
packages_names: ${{ env.code_packages_names }}
113114
cmake_args: -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
114115
workspace_dependencies: ${{ github.workspace }}/install
115116
ctest_args: --label-exclude "xfail"
116117
colcon_meta_file: ${{ github.workspace }}/src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
117118

119+
- name: Test Report
120+
uses: eProsima/eProsima-CI/external/test-reporter@main
121+
if: success() || failure()
122+
with:
123+
name: "Report: ${{ matrix.os }} | ${{ matrix.cmake_build_type }} "
124+
path: "${{ steps.compile_and_test.outputs.ctest_results_path }}*.xml"
125+
working-directory: 'src'
126+
path-replace-backslashes: 'true'
127+
list-tests: 'failed'
118128

119129
#####################################################################
120130
# ASAN
@@ -137,11 +147,20 @@ jobs:
137147
secret_token: ${{ secrets.GITHUB_TOKEN }}
138148

139149
- name: Compile and run tests
140-
uses: eProsima/eProsima-CI/multiplatform/asan_build_test@v0
150+
id: compile_and_test
151+
uses: eProsima/eProsima-CI/multiplatform/asan_build_test@main
141152
with:
142153
packages_names: ${{ env.code_packages_names }}
143154
workspace_dependencies: ${{ github.workspace }}/install
144155

156+
- name: Test Report
157+
uses: eProsima/eProsima-CI/external/test-reporter@main
158+
if: success() || failure()
159+
with:
160+
name: "Report: ASAN "
161+
path: "${{ steps.compile_and_test.outputs.ctest_results_path }}*.xml"
162+
working-directory: 'src'
163+
list-tests: 'failed'
145164

146165
#####################################################################
147166
# TSAN
@@ -164,11 +183,20 @@ jobs:
164183
secret_token: ${{ secrets.GITHUB_TOKEN }}
165184

166185
- name: Compile and run tests
167-
uses: eProsima/eProsima-CI/multiplatform/tsan_build_test@v0
186+
id: compile_and_test
187+
uses: eProsima/eProsima-CI/multiplatform/tsan_build_test@main
168188
with:
169189
packages_names: ${{ env.code_packages_names }}
170190
workspace_dependencies: ${{ github.workspace }}/install
171191

192+
- name: Test Report
193+
uses: eProsima/eProsima-CI/external/test-reporter@main
194+
if: success() || failure()
195+
with:
196+
name: "Report: TSAN "
197+
path: "${{ steps.compile_and_test.outputs.ctest_results_path }}*.xml"
198+
working-directory: 'src'
199+
list-tests: 'failed'
172200

173201
#####################################################################
174202
# CLANG
@@ -220,7 +248,7 @@ jobs:
220248
secret_token: ${{ secrets.GITHUB_TOKEN }}
221249

222250
- name: Compile and run tests
223-
uses: eProsima/eProsima-CI/ubuntu/coverage_build_test_upload@v0
251+
uses: eProsima/eProsima-CI/ubuntu/coverage_build_test_upload@main
224252
with:
225253
packages_names: ${{ env.code_packages_names }}
226254
workspace_dependencies: ${{ github.workspace }}/install
@@ -249,11 +277,22 @@ jobs:
249277
secret_token: ${{ secrets.GITHUB_TOKEN }}
250278

251279
- name: Compile and run tests
252-
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test_flaky@v0
280+
id: compile_and_test
281+
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@main
253282
with:
254283
packages_names: ${{ env.code_packages_names }}
255284
workspace_dependencies: ${{ github.workspace }}/install
285+
ctest_args: --label-regex "xfail"
256286

287+
- name: Test Report
288+
uses: eProsima/eProsima-CI/external/test-reporter@main
289+
if: success() || failure()
290+
with:
291+
name: "Report: Flaky "
292+
path: "${{ steps.compile_and_test.outputs.ctest_results_path }}*.xml"
293+
working-directory: 'src'
294+
fail-on-empty: 'false'
295+
list-tests: 'failed'
257296

258297
#####################################################################
259298
# DOCUMENTATION TEST

0 commit comments

Comments
 (0)