Draft workflow #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Draft workflow | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
test-solvers-windows: | ||
description: "Testing solvers and coverage (Windows)" | ||
default: 'no' | ||
type: choice | ||
options: | ||
- 'yes' | ||
- 'no' | ||
test-solvers-linux: | ||
description: "Testing solvers and coverage (Linux)" | ||
default: 'no' | ||
type: choice | ||
options: | ||
- 'yes' | ||
- 'no' | ||
test-windows: | ||
description: "Testing solvers and coverage (Windows)" | ||
default: 'no' | ||
type: choice | ||
options: | ||
- 'yes' | ||
- 'no' | ||
test-linux: | ||
description: "Testing solvers and coverage (Linux)" | ||
type: choice | ||
default: 'no' | ||
options: | ||
- 'yes' | ||
- 'no' | ||
jobs: | ||
# # ================================================================================================= | ||
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | ||
# # ================================================================================================= | ||
test-solvers-windows: | ||
Check failure on line 41 in .github/workflows/manual_draft.yml GitHub Actions / Draft workflowInvalid workflow file
|
||
name: Testing solvers and coverage (Windows) | ||
if: github.event.inputs.test-solvers-windows == 'yes' | ||
needs: [smoke-tests] | ||
runs-on: [ self-hosted, Windows, pyaedt ] | ||
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] | ||
pip install pytest-azurepipelines | ||
- name: Install CI dependencies (e.g. vtk-osmesa) | ||
run: | | ||
.venv\Scripts\Activate.ps1 | ||
# Uninstall conflicting dependencies | ||
pip uninstall --yes vtk | ||
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa | ||
- name: Run tests marked with 'solvers' | ||
env: | ||
PYTHONMALLOC: malloc | ||
run: | | ||
.venv\Scripts\Activate.ps1 | ||
pytest --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml -m solvers | ||
- uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: codecov-system-solver-tests | ||
file: ./coverage.xml | ||
flags: system,solver | ||
- name: Upload pytest test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pytest-solver-results | ||
path: junit/test-results.xml | ||
if: ${{ always() }} | ||
# # ================================================================================================= | ||
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | ||
# # ================================================================================================= | ||
test-solvers-linux: | ||
name: Testing solvers and coverage (Linux) | ||
if: github.event.inputs.test-solvers-linux == 'yes' | ||
needs: [smoke-tests] | ||
runs-on: [ self-hosted, Linux, pyaedt ] | ||
env: | ||
ANSYSEM_ROOT242: '/opt/AnsysEM/v242/Linux64' | ||
ANS_NODEPCHECK: '1' | ||
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: | | ||
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | ||
python -m venv .venv | ||
source .venv/bin/activate | ||
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U | ||
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U | ||
python -c "import sys; print(sys.executable)" | ||
- name: Install pyaedt and tests dependencies | ||
run: | | ||
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | ||
source .venv/bin/activate | ||
pip install .[tests] | ||
pip install pytest-azurepipelines | ||
- name: Run tests marked with 'solvers' | ||
run: | | ||
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | ||
source .venv/bin/activate | ||
pytest --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml -m solvers | ||
- uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: codecov-system-solver-tests | ||
file: ./coverage.xml | ||
flags: system,solver | ||
- name: Upload pytest test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pytest-solver-results | ||
path: junit/test-results.xml | ||
if: ${{ always() }} | ||
# # ================================================================================================= | ||
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | ||
# # ================================================================================================= | ||
test-windows: | ||
name: Testing and coverage (Windows) | ||
if: github.event.inputs.test-windows == 'yes' | ||
needs: [smoke-tests] | ||
runs-on: [ self-hosted, Windows, pyaedt ] | ||
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] | ||
pip install pytest-azurepipelines | ||
- name: Install CI dependencies (e.g. vtk-osmesa) | ||
run: | | ||
.venv\Scripts\Activate.ps1 | ||
# Uninstall conflicting dependencies | ||
pip uninstall --yes vtk | ||
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa | ||
- name: Run tests marked with 'general' | ||
uses: nick-fields/retry@v3 | ||
env: | ||
PYTHONMALLOC: malloc | ||
with: | ||
max_attempts: 2 | ||
retry_on: error | ||
timeout_minutes: 50 | ||
command: | | ||
.venv\Scripts\Activate.ps1 | ||
pytest -n 4 --dist loadfile --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml -m general | ||
- 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 | ||
if: ${{ always() }} | ||
# # ================================================================================================= | ||
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | ||
# # ================================================================================================= | ||
test-linux: | ||
name: Testing and coverage (Linux) | ||
if: github.event.inputs.test-linux == 'yes' | ||
needs: [smoke-tests] | ||
runs-on: [ self-hosted, Linux, pyaedt ] | ||
env: | ||
ANSYSEM_ROOT242: '/opt/AnsysEM/v242/Linux64' | ||
ANS_NODEPCHECK: '1' | ||
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: | | ||
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | ||
python -m venv .venv | ||
source .venv/bin/activate | ||
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U | ||
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U | ||
python -c "import sys; print(sys.executable)" | ||
- name: Install pyaedt and tests dependencies | ||
run: | | ||
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | ||
source .venv/bin/activate | ||
pip install .[tests] | ||
pip install pytest-azurepipelines | ||
- name: Install CI dependencies (e.g. vtk-osmesa) | ||
run: | | ||
source .venv/bin/activate | ||
# Uninstall conflicting dependencies | ||
pip uninstall --yes vtk | ||
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa | ||
- name: Run tests marked with 'general' | ||
uses: nick-fields/retry@v3 | ||
with: | ||
max_attempts: 2 | ||
retry_on: error | ||
timeout_minutes: 50 | ||
command: | | ||
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | ||
source .venv/bin/activate | ||
pytest -n 2 --dist loadfile --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml -m general | ||
- uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: codecov-system-solver-tests | ||
file: ./coverage.xml | ||
flags: system,solver | ||
- name: Upload pytest test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pytest-solver-results | ||
path: junit/test-results.xml | ||
if: ${{ always() }} |