@@ -173,6 +173,66 @@ jobs:
173173# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
174174# # =================================================================================================
175175
176+ test-windows :
177+ name : Testing and coverage (Windows)
178+ needs : [smoke-tests]
179+ runs-on : runs-on: [ self-hosted, Windows, pyaedt ]
180+ # Steps represent a sequence of tasks that will be executed as part of the job
181+ steps :
182+ - name : Install Git and checkout project
183+ uses : actions/checkout@v4
184+
185+ - name : Setup Python
186+ uses : actions/setup-python@v5
187+ with :
188+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
189+
190+ - name : Create virtual environment
191+ run : |
192+ python -m venv .venv
193+ .venv\Scripts\Activate.ps1
194+ python -m pip install pip -U
195+ python -m pip install wheel setuptools -U
196+ python -c "import sys; print(sys.executable)"
197+
198+ - name : Install pyaedt and tests dependencies
199+ run : |
200+ .venv\Scripts\Activate.ps1
201+ pip install .[tests]
202+
203+ - name : Install CI dependencies (e.g. vtk-osmesa)
204+ run : |
205+ .venv\Scripts\Activate.ps1
206+ # Uninstall conflicting dependencies
207+ pip uninstall vtk -y
208+ pip install --extra-index-url https://wheels.vtk.org .[ci]
209+
210+ - name : ' Unit testing'
211+ uses : nick-fields/retry@v3
212+ with :
213+ max_attempts : 3
214+ retry_on : error
215+ timeout_minutes : 40
216+ command : |
217+ .venv\Scripts\Activate.ps1
218+ Set-Item -Path env:PYTHONMALLOC -Value "malloc"
219+ pytest -n auto --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
220+
221+ - uses : codecov/codecov-action@v4
222+ with :
223+ token : ${{ secrets.CODECOV_TOKEN }}
224+ name : codecov-system-tests
225+ file : ./coverage.xml
226+ flags : system
227+
228+ - name : Upload pytest test results
229+ uses : actions/upload-artifact@v4
230+ with :
231+ name : pytest-results
232+ path : junit/test-results.xml
233+ # Use always() to always run this step to publish test results when there are test failures
234+ if : ${{ always() }}
235+
176236# legacy-tests:
177237# name: Test dotnet
178238# runs-on: [ Windows, self-hosted, pyedb ]
0 commit comments