From 7658172e0a4181456d1c0c323648f92d62b8200d Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Fri, 18 Oct 2024 19:15:32 +0200 Subject: [PATCH] github/workflows: upload test results to codecov Signed-off-by: Jan Luebbe --- .github/workflows/reusable-unit-tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-unit-tests.yml b/.github/workflows/reusable-unit-tests.yml index a415034a3..d31731410 100644 --- a/.github/workflows/reusable-unit-tests.yml +++ b/.github/workflows/reusable-unit-tests.yml @@ -58,12 +58,18 @@ jobs: ruff format --check --diff - name: Test with pytest run: | - pytest -r a --cov-config .coveragerc --cov=labgrid --local-sshmanager --ssh-username runner -k "not test_docker_with_daemon" + pytest -r a --cov-config .coveragerc --cov=labgrid --junitxml=junit.xml -o junit_family=legacy --local-sshmanager --ssh-username runner -k "not test_docker_with_daemon" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} flags: ${{ inputs.python-version }} + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: ${{ inputs.python-version }} - name: Build documentation run: | make -C doc clean