mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-09-02 23:30:04 +00:00
ci: add JUnit test reports to test pipeline job template
Makes xml reports available for parent.
This commit is contained in:
@@ -54,3 +54,35 @@ job_template_jinja = """
|
||||
git worktree remove -f mqtt || rm -rf mqtt
|
||||
"""
|
||||
runs_per_job = 15
|
||||
|
||||
# Test pipeline: same as idf-ci default but add GitLab JUnit test reports so the
|
||||
# pipeline/MR Tests tab shows per-test results (e.g. conformance tests).
|
||||
[gitlab.test_pipeline]
|
||||
job_template_jinja = """
|
||||
{{ settings.gitlab.test_pipeline.job_template_name }}:
|
||||
stage: "{{ settings.gitlab.test_pipeline.job_stage }}"
|
||||
image: "{{ settings.gitlab.test_pipeline.job_image }}"
|
||||
timeout: "1h"
|
||||
artifacts:
|
||||
paths:
|
||||
{%- for path in settings.gitlab.artifacts.test_job_filepatterns %}
|
||||
- "{{ path }}"
|
||||
{%- endfor %}
|
||||
expire_in: "1 week"
|
||||
when: "always"
|
||||
reports:
|
||||
junit: "**/XUNIT_RESULT_*.xml"
|
||||
variables:
|
||||
PYTEST_EXTRA_FLAGS: ""
|
||||
needs:
|
||||
- pipeline: "$PARENT_PIPELINE_ID"
|
||||
job: "build_test_related_apps{{ settings.gitlab.test_pipeline.parent_pipeline_job_suffix }}"
|
||||
before_script:
|
||||
- pip install -U 'idf-ci<1'
|
||||
script:
|
||||
- eval pytest $nodes
|
||||
--parallel-count ${CI_NODE_TOTAL:-1}
|
||||
--parallel-index ${CI_NODE_INDEX:-1}
|
||||
--junitxml "XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml"
|
||||
${PYTEST_EXTRA_FLAGS}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user