mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-25 00:34:27 +08:00
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:
parent
0c322a67c6
commit
b2531c851f
30
.github/workflows/unit-test.yml
vendored
30
.github/workflows/unit-test.yml
vendored
@ -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 }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user