partial-tests.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. name: Partial Tests Workflow
  2. on:
  3. push:
  4. branches: [ develop, dev/*, release/* ]
  5. pull_request:
  6. branches: [ develop, dev/*, release/* ]
  7. jobs:
  8. linter:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v4
  12. - uses: ricardochaves/python-lint@v1.4.0
  13. with:
  14. use-black: false
  15. use-flake8: false
  16. use-isort: false
  17. use-pycodestyle: false
  18. use-pylint: false
  19. use-mypy: false # TODO: re-enable mypy
  20. extra-mypy-options: "--ignore-missing-imports --implicit-optional --no-namespace-packages --exclude (taipy/templates/|generate_pyi.py|tools) --follow-imports skip"
  21. - uses: chartboost/ruff-action@v1
  22. tests:
  23. needs: linter
  24. timeout-minutes: 40
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. python-version: ['3.8', '3.9', '3.10', '3.11']
  29. os: [ubuntu-latest, windows-latest, macos-latest]
  30. runs-on: ${{ matrix.os }}
  31. steps:
  32. - uses: actions/checkout@v4
  33. - uses: dorny/paths-filter@v2
  34. id: changes
  35. with:
  36. filters: |
  37. cli:
  38. - 'taipy/_cli/**'
  39. config:
  40. - 'taipy/config/**'
  41. core:
  42. - 'taipy/core/**'
  43. gui:
  44. - 'taipy/gui/**'
  45. gui-core:
  46. - 'taipy/gui_core/**'
  47. logger:
  48. - 'taipy/logger/**'
  49. rest:
  50. - 'taipy/rest/**'
  51. templates:
  52. - 'taipy/templates/**'
  53. - uses: actions/setup-python@v5
  54. with:
  55. python-version: ${{matrix.python-version}}
  56. - name: Install pipenv
  57. run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
  58. - name: Install Dependencies
  59. run: pipenv install --dev --python=${{ matrix.python-version }}
  60. - name: Setup LibMagic (MacOS)
  61. if: matrix.os == 'macos-latest'
  62. run: brew install libmagic
  63. - uses: actions/setup-node@v4
  64. with:
  65. node-version: 20
  66. - name: Frontend Bundle Build
  67. if: steps.changes.outputs.gui == 'true' || steps.changes.outputs.gui-core == 'true'
  68. run: pipenv run python tools/frontend/bundle_build.py
  69. - name: Install Playwright
  70. if: steps.changes.outputs.gui == 'true' || steps.changes.outputs.gui-core == 'true'
  71. run: pipenv run playwright install chromium --with-deps
  72. - name: Pytest CLI
  73. if: steps.changes.outputs.cli == 'true'
  74. run: pipenv run pytest tests/cli
  75. - name: Pytest Config
  76. if: steps.changes.outputs.config == 'true'
  77. run: pipenv run pytest tests/config
  78. - name: Pytest Core
  79. if: steps.changes.outputs.core == 'true'
  80. run: pipenv run pytest -m "not orchestrator_dispatcher and not standalone" tests/core
  81. - name: Pytest GUI
  82. if: steps.changes.outputs.gui == 'true'
  83. run: pipenv run pytest tests/gui
  84. - name: Pytest GUI Core
  85. if: steps.changes.outputs.gui-core == 'true'
  86. run: pipenv run pytest tests/gui_core
  87. - name: Pytest Logger
  88. if: steps.changes.outputs.logger == 'true'
  89. run: pipenv run pytest tests/logger
  90. - name: Pytest Rest
  91. if: steps.changes.outputs.rest == 'true'
  92. run: pipenv run pytest tests/rest
  93. - name: Pytest Templates
  94. if: steps.changes.outputs.templates == 'true'
  95. run: pipenv run pytest tests/templates
  96. submit_tests:
  97. needs: linter
  98. timeout-minutes: 20
  99. strategy:
  100. fail-fast: false
  101. matrix:
  102. python-version: ['3.8', '3.9', '3.10', '3.11']
  103. os: [ubuntu-latest, windows-latest, macos-latest]
  104. runs-on: ${{ matrix.os }}
  105. steps:
  106. - uses: actions/checkout@v4
  107. - uses: dorny/paths-filter@v2
  108. id: changes
  109. with:
  110. filters: |
  111. core:
  112. - 'taipy/core/**'
  113. - uses: actions/setup-python@v5
  114. with:
  115. python-version: ${{matrix.python-version}}
  116. - name: Install pipenv
  117. if: steps.changes.outputs.core == 'true'
  118. run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
  119. - name: Install Dependencies
  120. if: steps.changes.outputs.core == 'true'
  121. run: pipenv install --dev --python=${{ matrix.python-version }}
  122. - name: Setup LibMagic (MacOS)
  123. if: matrix.os == 'macos-latest' && steps.changes.outputs.core == 'true'
  124. run: brew install libmagic
  125. - name: Pytest Core orchestrator_dispatcher
  126. if: steps.changes.outputs.core == 'true'
  127. run: pipenv run pytest -m "orchestrator_dispatcher" tests/core
  128. standalone_tests:
  129. needs: linter
  130. timeout-minutes: 20
  131. strategy:
  132. fail-fast: false
  133. matrix:
  134. python-version: ['3.8', '3.9', '3.10', '3.11']
  135. os: [ubuntu-latest, windows-latest, macos-latest]
  136. runs-on: ${{ matrix.os }}
  137. steps:
  138. - uses: actions/checkout@v4
  139. - uses: dorny/paths-filter@v2
  140. id: changes
  141. with:
  142. filters: |
  143. core:
  144. - 'taipy/core/**'
  145. - uses: actions/setup-python@v5
  146. with:
  147. python-version: ${{matrix.python-version}}
  148. - name: Install pipenv
  149. if: steps.changes.outputs.core == 'true'
  150. run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
  151. - name: Install Dependencies
  152. if: steps.changes.outputs.core == 'true'
  153. run: pipenv install --dev --python=${{ matrix.python-version }}
  154. - name: Setup LibMagic (MacOS)
  155. if: matrix.os == 'macos-latest' && steps.changes.outputs.core == 'true'
  156. run: brew install libmagic
  157. - name: Pytest Core standalone
  158. if: steps.changes.outputs.core == 'true'
  159. run: pipenv run pytest -m "standalone" tests/core