unit-test.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: unit-test
  2. on:
  3. push:
  4. paths:
  5. - 'plugins/**'
  6. - 'resources/**'
  7. - 'cura/**'
  8. - 'icons/**'
  9. - 'tests/**'
  10. - '.github/workflows/unit-test.yml'
  11. - '.github/workflows/requirements-runner.txt'
  12. - 'requirements*.txt'
  13. - 'conanfile.py'
  14. - 'conandata.yml'
  15. - '*.jinja'
  16. branches:
  17. - main
  18. - 'CURA-*'
  19. - 'PP-*'
  20. - '[0-9]+.[0-9]+'
  21. pull_request:
  22. paths:
  23. - 'plugins/**'
  24. - 'resources/**'
  25. - 'cura/**'
  26. - 'icons/**'
  27. - 'tests/**'
  28. - '.github/workflows/unit-test.yml'
  29. - '.github/workflows/requirements-runner.txt'
  30. - 'requirements*.txt'
  31. - 'conanfile.py'
  32. - 'conandata.yml'
  33. - '*.jinja'
  34. branches:
  35. - main
  36. - '[0-9]+.[0-9]+'
  37. permissions:
  38. contents: read
  39. env:
  40. CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER }}
  41. CONAN_PASSWORD: ${{ secrets.CONAN_PASS }}
  42. jobs:
  43. conan-recipe-version:
  44. uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@main
  45. with:
  46. project_name: cura
  47. testing:
  48. uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@main
  49. needs: [ conan-recipe-version ]
  50. with:
  51. recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
  52. conan_extra_args: '-g VirtualPythonEnv -o cura:devtools=True -c tools.build:skip_test=False --options "*:enable_sentry=False"'
  53. unit_test_cmd: 'pytest --junitxml=junit_cura.xml'
  54. unit_test_dir: 'tests'
  55. conan_generator_dir: './venv/bin'
  56. secrets: inherit