|
31 | 31 | rundate: ${{ steps.output-services.outputs.rundate }} |
32 | 32 | env: |
33 | 33 | MATRIX_SIZE: 10 |
34 | | - PUSH_MATRIX_SIZE: 1 |
| 34 | + PUSH_MATRIX_SIZE: 5 |
35 | 35 | DAILY_MATRIX_SIZE: 80 |
36 | 36 | BSIM_OUT_PATH: /opt/bsim/ |
37 | 37 | BSIM_COMPONENTS_PATH: /opt/bsim/components |
@@ -234,11 +234,10 @@ jobs: |
234 | 234 | name: Run Tests with Twister (Push) |
235 | 235 | id: run_twister |
236 | 236 | run: | |
237 | | -
|
238 | 237 | export ZEPHYR_BASE=${PWD} |
239 | 238 | export ZEPHYR_TOOLCHAIN_VARIANT=zephyr |
240 | 239 | ./scripts/twister -T tests/kernel/threads -p qemu_x86 --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS} |
241 | | - if [ "${{matrix.subset}}" = "11" ]; then |
| 240 | + if [ "${{matrix.subset}}" = "1" ]; then |
242 | 241 | ./scripts/zephyr_module.py --twister-out module_tests.args |
243 | 242 | if [ -s module_tests.args ]; then |
244 | 243 | ./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS} |
@@ -312,6 +311,67 @@ jobs: |
312 | 311 | path: | |
313 | 312 | frozen-requirements.txt |
314 | 313 |
|
| 314 | + twister-test-results: |
| 315 | + name: "Publish Unit Tests Results" |
| 316 | + env: |
| 317 | + ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }} |
| 318 | + ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443" |
| 319 | + needs: |
| 320 | + - twister-build |
| 321 | + runs-on: ubuntu-22.04 |
| 322 | + # the build-and-test job might be skipped, we don't need to run this job then |
| 323 | + if: success() || failure() |
| 324 | + |
| 325 | + steps: |
| 326 | + # Needed for elasticearch and upload script |
| 327 | + - if: github.event_name == 'push' || github.event_name == 'schedule' |
| 328 | + name: Checkout |
| 329 | + uses: actions/checkout@v4 |
| 330 | + with: |
| 331 | + fetch-depth: 0 |
| 332 | + persist-credentials: false |
| 333 | + |
| 334 | + - name: Download Artifacts |
| 335 | + uses: actions/download-artifact@v4 |
| 336 | + with: |
| 337 | + path: artifacts |
| 338 | + |
| 339 | + - if: github.event_name == 'push' || github.event_name == 'schedule' |
| 340 | + name: Upload to elasticsearch |
| 341 | + run: | |
| 342 | + pip3 install elasticsearch |
| 343 | + # set run date on upload to get consistent and unified data across the matrix. |
| 344 | + if [ "${{github.event_name}}" = "push" ]; then |
| 345 | + python3 ./scripts/ci/upload_test_results_es.py -r ${{needs.twister-build.outputs.rundate}} \ |
| 346 | + --run-attempt ${{github.run_attempt}} \ |
| 347 | + --index zephyr-main-ci-push-1 artifacts/*/*/twister.json |
| 348 | + elif [ "${{github.event_name}}" = "schedule" ]; then |
| 349 | + python3 ./scripts/ci/upload_test_results_es.py -r ${{needs.twister-build.outputs.rundate}} \ |
| 350 | + --run-attempt ${{github.run_attempt}} \ |
| 351 | + --index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json |
| 352 | + fi |
| 353 | +
|
| 354 | + - name: Merge Test Results |
| 355 | + run: | |
| 356 | + pip3 install junitparser junit2html |
| 357 | + junitparser merge artifacts/*/*/twister.xml junit.xml |
| 358 | + junit2html junit.xml junit.html |
| 359 | +
|
| 360 | + - name: Upload Unit Test Results in HTML |
| 361 | + if: always() |
| 362 | + uses: actions/upload-artifact@v4 |
| 363 | + with: |
| 364 | + name: HTML Unit Test Results |
| 365 | + if-no-files-found: ignore |
| 366 | + path: | |
| 367 | + junit.html |
| 368 | +
|
| 369 | + - name: Publish Unit Test Results |
| 370 | + uses: EnricoMi/publish-unit-test-result-action@v2 |
| 371 | + with: |
| 372 | + check_name: Unit Test Results |
| 373 | + files: "**/twister.xml" |
| 374 | + comment_mode: off |
315 | 375 | twister-status-check: |
316 | 376 | if: always() |
317 | 377 | name: "Check Twister Status" |
|
0 commit comments