Skip to content

Commit ffa532f

Browse files
committed
CI: Add job test-solver-windows
1 parent a8f8b15 commit ffa532f

File tree

1 file changed

+53
-88
lines changed

1 file changed

+53
-88
lines changed

.github/workflows/ci_cd.yml

Lines changed: 53 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -109,100 +109,65 @@ jobs:
109109
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
110110
# # =================================================================================================
111111

112-
# testing-windows:
113-
# name: Testing and coverage (Windows)
114-
# needs: [smoke-tests]
115-
# runs-on: [ self-hosted, windows-latest, pyaedt ]
116-
# continue-on-error: ${{ matrix.experimental }}
117-
# strategy:
118-
# fail-fast: false
119-
# steps:
120-
# - name: Install Git and clone project
121-
# uses: actions/checkout@v4
122-
123-
# - name: Set up Python without using cache
124-
# uses: actions/setup-python@v5
125-
# if: inputs.use-cache == 'false'
126-
# with:
127-
# python-version: ${{ inputs.MAIN_PYTHON_VERSION }}
128-
129-
# - name: Create Python virtual environment
130-
# run: |
131-
# python -m venv .venv
132-
# . .venv\Scripts\Activate.ps1
133-
# python -m pip install -U pip
134-
# python -m pip install wheel setuptools -U
135-
# python -c "import sys; print(sys.executable)"
136-
137-
# - name: Install Python library and tests dependencies
138-
# run: |
139-
# . .venv\Scripts\Activate.ps1
140-
# python -m pip install .[tests]
141-
142-
# - name: Uninstall conflicting CI packages
143-
# run: |
144-
# .\.venv\Scripts\Activate.ps1
145-
# pip uninstall vtk -y
146-
147-
# - name: Install CI related dependencies
148-
# run: |
149-
# .\.venv\Scripts\Activate.ps1
150-
# pip install --extra-index-url https://wheels.vtk.org .[ci]
151-
152-
# - name: "Executing legacy tests"
153-
# uses: nick-fields/retry@v3
154-
# with:
155-
# max_attempts: 3
156-
# retry_on: error
157-
# timeout_minutes: 10
158-
# command: |
159-
# . .venv\Scripts\Activate.ps1
160-
# Set-Item -Path env:PYTHONMALLOC -Value "malloc"
161-
# pytest --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest_solvers
162-
# pytest -m "legacy" -n auto --dist loadfile -v --cov
163-
164-
# - name: "Create coverage files"
165-
# run: |
166-
# . .venv\Scripts\Activate.ps1
167-
# python -m coverage html -d .cov\legacy-html
168-
# python -m coverage xml -o .cov\legacy.xml
169-
170-
# - name: Upload Coverage Results
171-
# if: always()
172-
# uses: actions/upload-artifact@v4
173-
# with:
174-
# path: .cov\legacy-html
175-
# name: html-legacy-coverage
176-
# retention-days: 7
177-
178-
# - name: Upload coverage to Codecov
179-
# uses: codecov/codecov-action@v3
180-
# env:
181-
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
182-
# with:
183-
# files: .cov/legacy.xml
184-
185-
186-
187-
188-
189-
190-
191-
192-
193-
194-
195-
196-
197-
198-
199-
112+
test-solver-windows:
113+
name: Testing solvers and coverage (Windows)
114+
needs: [smoke-tests]
115+
runs-on: runs-on: [ self-hosted, Windows, pyaedt ]
116+
# Steps represent a sequence of tasks that will be executed as part of the job
117+
steps:
118+
- name: Install Git and checkout project
119+
uses: actions/checkout@v4
200120

121+
- name: Setup Python
122+
uses: actions/setup-python@v5
123+
with:
124+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
201125

126+
- name: Create virtual environment
127+
run: |
128+
python -m venv .venv
129+
.venv\Scripts\Activate.ps1
130+
python -m pip install pip -U
131+
python -m pip install wheel setuptools -U
132+
python -c "import sys; print(sys.executable)"
202133
134+
- name: Install pyaedt and tests dependencies
135+
run: |
136+
.venv\Scripts\Activate.ps1
137+
pip install .[tests]
203138
139+
- name: Install CI dependencies (e.g. vtk-osmesa)
140+
run: |
141+
.venv\Scripts\Activate.ps1
142+
# Uninstall conflicting dependencies
143+
pip uninstall vtk -y
144+
pip install --extra-index-url https://wheels.vtk.org .[ci]
204145
146+
- name: 'Unit testing'
147+
uses: nick-fields/retry@v3
148+
with:
149+
max_attempts: 3
150+
retry_on: error
151+
timeout_minutes: 40
152+
command: |
153+
.venv\Scripts\Activate.ps1
154+
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
155+
pytest --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest_solvers
156+
157+
- uses: codecov/codecov-action@v4
158+
with:
159+
token: ${{ secrets.CODECOV_TOKEN }}
160+
name: codecov-system-solver-tests
161+
file: ./coverage.xml
162+
flags: system,solver
205163

164+
- name: Upload pytest test results
165+
uses: actions/upload-artifact@v4
166+
with:
167+
name: pytest-solver-results
168+
path: junit/test-results.xml
169+
# Use always() to always run this step to publish test results when there are test failures
170+
if: ${{ always() }}
206171

207172
# # =================================================================================================
208173
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

0 commit comments

Comments
 (0)