Skip to content

Commit 45ede90

Browse files
committed
Revert "publish step"
This reverts commit 8c2a667.
1 parent 8c2a667 commit 45ede90

File tree

2 files changed

+63
-76
lines changed

2 files changed

+63
-76
lines changed

.github/workflows/twister-publish.yaml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/twister.yaml

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
rundate: ${{ steps.output-services.outputs.rundate }}
3232
env:
3333
MATRIX_SIZE: 10
34-
PUSH_MATRIX_SIZE: 1
34+
PUSH_MATRIX_SIZE: 5
3535
DAILY_MATRIX_SIZE: 80
3636
BSIM_OUT_PATH: /opt/bsim/
3737
BSIM_COMPONENTS_PATH: /opt/bsim/components
@@ -234,11 +234,10 @@ jobs:
234234
name: Run Tests with Twister (Push)
235235
id: run_twister
236236
run: |
237-
238237
export ZEPHYR_BASE=${PWD}
239238
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
240239
./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
242241
./scripts/zephyr_module.py --twister-out module_tests.args
243242
if [ -s module_tests.args ]; then
244243
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS}
@@ -312,6 +311,67 @@ jobs:
312311
path: |
313312
frozen-requirements.txt
314313
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
315375
twister-status-check:
316376
if: always()
317377
name: "Check Twister Status"

0 commit comments

Comments
 (0)