Skip to content

Commit

Permalink
CI: Add job test-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys committed Feb 28, 2024
1 parent ffa532f commit 4dd456f
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,66 @@ jobs:
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================

test-windows:
name: Testing and coverage (Windows)
needs: [smoke-tests]
runs-on: runs-on: [ self-hosted, Windows, pyaedt ]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install Git and checkout project
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

- name: Create virtual environment
run: |
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install pip -U
python -m pip install wheel setuptools -U
python -c "import sys; print(sys.executable)"
- name: Install pyaedt and tests dependencies
run: |
.venv\Scripts\Activate.ps1
pip install .[tests]
- name: Install CI dependencies (e.g. vtk-osmesa)
run: |
.venv\Scripts\Activate.ps1
# Uninstall conflicting dependencies
pip uninstall vtk -y
pip install --extra-index-url https://wheels.vtk.org .[ci]
- name: 'Unit testing'
uses: nick-fields/retry@v3
with:
max_attempts: 3
retry_on: error
timeout_minutes: 40
command: |
.venv\Scripts\Activate.ps1
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
pytest -n auto --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-system-tests
file: ./coverage.xml
flags: system

- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results
path: junit/test-results.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}

# legacy-tests:
# name: Test dotnet
# runs-on: [ Windows, self-hosted, pyedb ]
Expand Down

0 comments on commit 4dd456f

Please sign in to comment.