File tree Expand file tree Collapse file tree 3 files changed +19
-13
lines changed
Expand file tree Collapse file tree 3 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 7878
7979 - name : Upload Coverage Results
8080 uses : actions/upload-artifact@v6
81+ if : always()
8182 with :
82- name : raw- coverage-${{ env.DEFAULT_PYTHON }}
83- path : reports/.coverage *
83+ name : coverage-${{ env.DEFAULT_PYTHON }}
84+ path : reports/*
8485 # https://github.com/actions/upload-artifact/issues/602
8586 include-hidden-files : true
8687
@@ -112,6 +113,18 @@ jobs:
112113 - name : Checkout code
113114 uses : actions/checkout@v6
114115
116+ - name : Download all raw coverage data
117+ uses : actions/download-artifact@v7
118+ with :
119+ path : coverage-data/
120+ pattern : coverage-*
121+
122+ - name : Show test results
123+ uses : mikepenz/action-junit-report@v5
124+ if : success() || failure() # always run even if the previous step fails
125+ with :
126+ report_paths : reports/junit/*.xml
127+
115128 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
116129 uses : actions/setup-python@v6
117130 with :
@@ -125,12 +138,6 @@ jobs:
125138 export UV=$(which uv)
126139 make venv-install
127140
128- - name : Download all raw coverage data
129- uses : actions/download-artifact@v7
130- with :
131- path : coverage-data/
132- pattern : raw-coverage-*
133-
134141 - name : Combine Coverage Data
135142 run : |
136143 uv run coverage combine coverage-data
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ PIP = ${VIRTUAL_ENV}/bin/pip
99UV ?= ${VIRTUAL_ENV}/bin/uv
1010PYTEST = ${VIRTUAL_ENV}/bin/pytest
1111COVERAGE = ${VIRTUAL_ENV}/bin/coverage
12+ GITHUB_RUN_ID ?= unknown
1213
1314# Fix docker build and docker compose build using different backends
1415COMPOSE_DOCKER_CLI_BUILD = 1
@@ -100,7 +101,7 @@ test-broker-start: ##@TestBroker Start broker
100101 docker compose -f docker-compose.test.yml up -d --wait broker $(DOCKER_COMPOSE_ARGS )
101102
102103test-ci : test-db test-broker # #@Test Run CI tests
103- ${COVERAGE} run -m pytest $(PYTEST_ARGS )
104+ ${COVERAGE} run -m pytest --junitxml=reports/junit/ ${GITHUB_RUN_ID} .xml $(PYTEST_ARGS )
104105
105106test-check-fixtures : # #@Test Check declared fixtures
106107 ${PYTEST} --dead-fixtures $(PYTEST_ARGS )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ dirty_template = "{tag}.dev{env:GITHUB_RUN_ID:{ccount}}+git.{sha}.dirty"
1111
1212[project ]
1313name = " data-rentgen"
14- license = " Apache-2.0"
14+ license = { text = " Apache-2.0" }
1515description = " Data.Rentgen REST API + Kafka consumer"
1616authors = [{name = " MWS Data Bridge" , email = " onetools@mts.ru" }]
1717readme = " README.rst"
@@ -155,10 +155,8 @@ markers = [
155155asyncio_default_fixture_loop_scope = " session"
156156asyncio_default_test_loop_scope = " session"
157157
158- [tool .coverage .paths ]
159- source = [" data_rentgen" ]
160-
161158[tool .coverage .run ]
159+ source_pkgs = [" data_rentgen" ]
162160branch = true
163161parallel = true
164162relative_files = true
You can’t perform that action at this time.
0 commit comments