Run unit tests as a composite action

To avoid conflicts between the Cura Python modules and the
EnricoMi/publish-unit-test-result-action

Contributes to CURA-9459
This commit is contained in:
j.spijker@ultimaker.com 2022-07-15 13:39:36 +02:00 committed by Jelle Spijker
parent 0c322a67c6
commit b2531c851f

View File

@ -125,13 +125,37 @@ jobs:
pytest --junitxml=junit_cura.xml
working-directory: tests
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: Test Results
path: "tests/**/*.xml"
publish-test-results:
runs-on: ubuntu-20.04
needs: [ conan-recipe-version ]
if: success() || failure()
steps:
- name: Setup Python and pip
uses: actions/setup-python@v4
with:
python-version: '3.10.x'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: .github/workflows/requirements-conan-package.txt
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Publish Unit Test Results
id: test-results
uses: EnricoMi/publish-unit-test-result-action@v1
if: ${{ always() }}
with:
files: |
tests/*.xml
files: "artifacts/**/*.xml"
- name: Conclusion
run: echo "Conclusion is ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}"