Skip to content

Commit 39d41ca

Browse files
committed
clean 2
Signed-off-by: Anas Nashif <[email protected]>
1 parent 6ccad3c commit 39d41ca

File tree

2 files changed

+7
-76
lines changed

2 files changed

+7
-76
lines changed

.github/workflows/twister-publish.yaml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
workflows: ["Run tests with twister"]
66
branches:
77
- main
8+
- topic/ci/upload_results
89
- v*
910
types:
1011
- completed
@@ -15,8 +16,6 @@ jobs:
1516
env:
1617
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
1718
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
18-
needs:
19-
- twister-build
2019
runs-on: ubuntu-22.04
2120
# the build-and-test job might be skipped, we don't need to run this job then
2221
if: success() || failure()
@@ -40,12 +39,13 @@ jobs:
4039
run: |
4140
pip3 install elasticsearch
4241
# set run date on upload to get consistent and unified data across the matrix.
42+
run_date=`date --iso-8601=minutes`
4343
if [ "${{github.event_name}}" = "push" ]; then
44-
python3 ./scripts/ci/upload_test_results_es.py -r ${{needs.twister-build.outputs.rundate}} \
44+
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
4545
--run-attempt ${{github.run_attempt}} \
4646
--index zephyr-main-ci-push-1 artifacts/*/*/twister.json
4747
elif [ "${{github.event_name}}" = "schedule" ]; then
48-
python3 ./scripts/ci/upload_test_results_es.py -r ${{needs.twister-build.outputs.rundate}} \
48+
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
4949
--run-attempt ${{github.run_attempt}} \
5050
--index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json
5151
fi
@@ -71,12 +71,3 @@ jobs:
7171
check_name: Unit Test Results
7272
files: "**/twister.xml"
7373
comment_mode: off
74-
twister-status-check:
75-
if: always()
76-
name: "Check Twister Status"
77-
needs:
78-
- twister-build-prep
79-
- twister-build
80-
uses: ./.github/workflows/ready-to-merge.yml
81-
with:
82-
needs_context: ${{ toJson(needs) }}

.github/workflows/twister.yaml

Lines changed: 3 additions & 63 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: 5
34+
PUSH_MATRIX_SIZE: 1
3535
DAILY_MATRIX_SIZE: 80
3636
BSIM_OUT_PATH: /opt/bsim/
3737
BSIM_COMPONENTS_PATH: /opt/bsim/components
@@ -234,10 +234,11 @@ jobs:
234234
name: Run Tests with Twister (Push)
235235
id: run_twister
236236
run: |
237+
237238
export ZEPHYR_BASE=${PWD}
238239
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
239240
./scripts/twister -T tests/kernel/threads -p qemu_x86 --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS}
240-
if [ "${{matrix.subset}}" = "1" ]; then
241+
if [ "${{matrix.subset}}" = "11" ]; then
241242
./scripts/zephyr_module.py --twister-out module_tests.args
242243
if [ -s module_tests.args ]; then
243244
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS}
@@ -311,67 +312,6 @@ jobs:
311312
path: |
312313
frozen-requirements.txt
313314
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
375315
twister-status-check:
376316
if: always()
377317
name: "Check Twister Status"

0 commit comments

Comments
 (0)