Skip to content

CHORE: updating CHANGELOG for v0.25.0 #2

CHORE: updating CHANGELOG for v0.25.0

CHORE: updating CHANGELOG for v0.25.0 #2

Workflow file for this run

name: CI - Release
on:
push:
tags:
- "v*.*.*"
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
DOCUMENTATION_CNAME: 'aedt.docs.pyansys.com'
MAIN_PYTHON_VERSION: '3.13'
ON_CI: True
PACKAGE_NAME: 'PyAEDT'
PYTEST_ARGUMENTS: -vvv --color=yes -ra --durations=25 --maxfail=10 --cov=ansys.aedt.core --cov-report=html --cov-report=xml --junitxml=junit/test-results.xml
PYAEDT_LOCAL_SETTINGS_PATH: 'tests/pyaedt_settings.yaml'
TESTS_VERSION: '3.10'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Disable all default permissions at workflow level for security (least privilege principle)
# Individual jobs will explicitly request only the permissions they need
permissions: {}
jobs:
update-changelog:
name: "Update CHANGELOG"
runs-on: ubuntu-latest
permissions:
contents: write # Required to commit and push changelog updates to the repository
pull-requests: write # Required to create pull requests with changelog updates
steps:
- uses: ansys/actions/doc-deploy-changelog@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
use-upper-case: true
vulnerabilities:
name: "Vulnerabilities"
runs-on: ubuntu-latest
permissions:
contents: read # Required to read repository content for vulnerability scanning
steps:
- uses: ansys/actions/check-vulnerabilities@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-package-name: ${{ env.PACKAGE_NAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
dev-mode: ${{ github.ref != 'refs/heads/main' }}
extra-targets: 'all'
actions-security:
name: "Check actions security"
runs-on: ubuntu-latest
permissions:
contents: read # Required to read workflow files and check for security issues
steps:
- uses: ansys/actions/check-actions-security@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
generate-summary: true
token: ${{ secrets.GITHUB_TOKEN }}
auditing-level: 'high'
doc-style:
name: Documentation style check
runs-on: ubuntu-latest
permissions:
contents: read # Required to read documentation files for style checking
steps:
- name: Check documentation style
uses: ansys/actions/doc-style@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail-level: 'warning'
doc-build:
name: Documentation build
runs-on: ubuntu-latest
needs: [doc-style]
steps:
- name: Documentation build
uses: ansys/actions/doc-build@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra"
skip-install: true
python-version: ${{ env.MAIN_PYTHON_VERSION }}
use-python-cache: false
sphinxopts: '-j auto --color -w build_errors.txt'
check-links: false
needs-quarto: true
smoke-tests:
name: Build wheelhouse and smoke tests
runs-on: ${{ matrix.os }}
permissions:
attestations: write # Required to create and publish build attestations (SLSA provenance)
contents: read # Required to read repository content for building
id-token: write # Required for OIDC token generation (for provenance signing)
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Build wheelhouse and perform smoke test
id: build-wheelhouse
uses: ansys/actions/build-wheelhouse@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
target: 'all'
attest-provenance: true
use-python-cache: false
whitelist-license-check: 'fpdf2'
- name: Import python package
env:
ACTIVATE_VENV: ${{ steps.build-wheelhouse.outputs.activate-venv }}
shell: bash
run: |
${ACTIVATE_VENV}
python -c "import ansys.aedt.core; from ansys.aedt.core import __version__"
unit-tests:
name: Unit tests
needs: smoke-tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Xvfb
shell: bash
run: sudo apt-get install -y xvfb
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
source .venv/bin/activate
uv sync --frozen --extra unit-tests
- name: Run unit tests
env:
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
source .venv/bin/activate
xvfb-run pytest ${PYTEST_ARGUMENTS} tests/unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-unit-tests
files: ./coverage.xml
flags: linux_unit
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-unit
path: junit/test-results.xml
if: ${{ always() }}
integration-tests:
name: Integration tests
needs: unit-tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
source .venv/bin/activate
uv sync --frozen --extra integration-tests
- name: Run integration tests
env:
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
source .venv/bin/activate
pytest ${PYTEST_ARGUMENTS} tests/integration
- name: Upload coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-integration-tests
files: ./coverage.xml
flags: linux_integration
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-integration
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-solvers-windows:
name: Test solvers (windows)
needs: integration-tests
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
.venv\Scripts\Activate.ps1
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: powershell
run: |
Get-Process | Where-Object {
$_.Path -like "*ansys inc*" -or $_.Path -like "*ansysem*"
} | ForEach-Object {
Write-Output "Killing $($_.Name) (PID: $($_.Id))"
Stop-Process -Id $_.Id -Force
}
- name: Run tests marked with 'solvers'
env:
PYTHONMALLOC: malloc
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
.venv\Scripts\Activate.ps1
$args = $env:PYTEST_ARGUMENTS -split ' '
pytest @args --timeout=600 tests/system/solvers
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-solvers-tests-windows
files: ./coverage.xml
flags: windows_system_solvers
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-solvers-windows
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-solvers-linux:
name: Test solvers (linux)
needs: integration-tests
runs-on: [ self-hosted, Linux, pyaedt ]
env:
ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM'
ANS_NODEPCHECK: '1'
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
source .venv/bin/activate
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: bash
run: |
for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do
echo "Killing PID $pid"
kill -9 "$pid"
done
- name: Run tests marked with 'solvers'
env:
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
source .venv/bin/activate
pytest ${PYTEST_ARGUMENTS} --timeout=600 tests/system/solvers
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-solvers-tests-linux
files: ./coverage.xml
flags: linux_system_solvers
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-solvers-linux
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-general-windows:
name: Test general (windows)
needs: integration-tests
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Set up headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
.venv\Scripts\Activate.ps1
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: powershell
run: |
Get-Process | Where-Object {
$_.Path -like "*ansys inc*" -or $_.Path -like "*ansysem*"
} | ForEach-Object {
Write-Output "Killing $($_.Name) (PID: $($_.Id))"
Stop-Process -Id $_.Id -Force
}
- name: Run tests marked with 'general'
env:
PYTHONMALLOC: malloc
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
.venv\Scripts\Activate.ps1
$args = $env:PYTEST_ARGUMENTS -split ' '
pytest @args -n 4 --dist loadfile --timeout=600 tests/system/general
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-general-tests-windows
files: ./coverage.xml
flags: windows_system_general
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-general-windows
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-general-linux:
name: Test general (linux)
needs: integration-tests
runs-on: [ self-hosted, Linux, pyaedt ]
env:
ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM'
ANS_NODEPCHECK: '1'
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Set up headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
source .venv/bin/activate
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: bash
run: |
for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do
echo "Killing PID $pid"
kill -9 "$pid"
done
- name: Run tests marked with 'general'
env:
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
run: |
source .venv/bin/activate
pytest ${PYTEST_ARGUMENTS} -n 4 --dist loadfile --timeout=600 tests/system/general
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-general-tests-linux
files: ./coverage.xml
flags: linux_system_general
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-general-linux
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-visualization-windows:
name: Test visualization (windows)
needs: integration-tests
runs-on: [ self-hosted, Windows, pyaedt ]
env:
MPLBACKEND: 'Agg'
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Set up headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
.venv\Scripts\Activate.ps1
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: powershell
run: |
Get-Process | Where-Object {
$_.Path -like "*ansys inc*" -or $_.Path -like "*ansysem*"
} | ForEach-Object {
Write-Output "Killing $($_.Name) (PID: $($_.Id))"
Stop-Process -Id $_.Id -Force
}
- name: Run tests marked with 'visualization'
env:
PYTHONMALLOC: malloc
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
.venv\Scripts\Activate.ps1
$args = $env:PYTEST_ARGUMENTS -split ' '
pytest @args -n 4 --dist loadfile --timeout=600 tests/system/visualization -x
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-visualization-tests-windows
files: ./coverage.xml
flags: windows_system_visualization
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-visualization-windows
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-visualization-linux:
name: Test visualization (linux)
needs: integration-tests
runs-on: [ self-hosted, Linux, pyaedt ]
env:
ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM'
ANS_NODEPCHECK: '1'
MPLBACKEND: 'Agg'
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Set up headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
source .venv/bin/activate
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: bash
run: |
for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do
echo "Killing PID $pid"
kill -9 "$pid"
done
- name: Run tests marked with 'visualization'
env:
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
run: |
source .venv/bin/activate
pytest ${PYTEST_ARGUMENTS} -n 4 --dist loadfile --timeout=300 tests/system/visualization -x
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-visualization-tests-linux
files: ./coverage.xml
flags: linux_system_visualization
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-visualization-linux
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-icepak-windows:
name: Test icepak (windows)
needs: integration-tests
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
.venv\Scripts\Activate.ps1
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: powershell
run: |
Get-Process | Where-Object {
$_.Path -like "*ansys inc*" -or $_.Path -like "*ansysem*"
} | ForEach-Object {
Write-Output "Killing $($_.Name) (PID: $($_.Id))"
Stop-Process -Id $_.Id -Force
}
- name: Run tests marked with 'icepak'
env:
PYTHONMALLOC: malloc
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
.venv\Scripts\Activate.ps1
$args = $env:PYTEST_ARGUMENTS -split ' '
pytest @args --timeout=600 tests/system/icepak
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-icepak-tests-windows
files: ./coverage.xml
flags: windows_system_icepak
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-icepak-windows
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-icepak-linux:
name: Test icepak (linux)
needs: integration-tests
runs-on: [ self-hosted, Linux, pyaedt ]
env:
ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM'
ANS_NODEPCHECK: '1'
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
source .venv/bin/activate
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: bash
run: |
for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do
echo "Killing PID $pid"
kill -9 "$pid"
done
- name: Run tests marked with 'icepak'
env:
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
source .venv/bin/activate
pytest ${PYTEST_ARGUMENTS} --timeout=600 tests/system/icepak
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-icepak-tests-linux
files: ./coverage.xml
flags: linux_system_icepak
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-icepak-linux
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-layout-windows:
name: Test layout (windows)
needs: integration-tests
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
.venv\Scripts\Activate.ps1
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: powershell
run: |
Get-Process | Where-Object {
$_.Path -like "*ansys inc*" -or $_.Path -like "*ansysem*"
} | ForEach-Object {
Write-Output "Killing $($_.Name) (PID: $($_.Id))"
Stop-Process -Id $_.Id -Force
}
- name: Run tests marked with 'layout'
env:
PYTHONMALLOC: malloc
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
.venv\Scripts\Activate.ps1
$args = $env:PYTEST_ARGUMENTS -split ' '
pytest @args --timeout=600 tests/system/layout
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-layout-tests-windows
files: ./coverage.xml
flags: windows_system_layout
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-layout-windows
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-layout-linux:
name: Test layout (linux)
needs: integration-tests
runs-on: [ self-hosted, Linux, pyaedt ]
env:
ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM'
ANS_NODEPCHECK: '1'
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
source .venv/bin/activate
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: bash
run: |
for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do
echo "Killing PID $pid"
kill -9 "$pid"
done
- name: Run tests marked with 'layout'
env:
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
source .venv/bin/activate
pytest ${PYTEST_ARGUMENTS} --timeout=600 tests/system/layout
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-layout-tests-linux
files: ./coverage.xml
flags: linux_system_layout
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-layout-linux
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-extensions-windows:
name: Test extensions (windows)
needs: integration-tests
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# NOTE: Our windows runners are impacted by nodejs/node#56645 so we cannot use astral-sh/setup-uv@v7
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Set up headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
.venv\Scripts\Activate.ps1
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: powershell
run: |
Get-Process | Where-Object {
$_.Path -like "*ansys inc*" -or $_.Path -like "*ansysem*"
} | ForEach-Object {
Write-Output "Killing $($_.Name) (PID: $($_.Id))"
Stop-Process -Id $_.Id -Force
}
- name: Run tests marked with 'extensions'
env:
PYTHONMALLOC: malloc
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
.venv\Scripts\Activate.ps1
$args = $env:PYTEST_ARGUMENTS -split ' '
pytest @args --timeout=600 tests/system/extensions
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-extensions-tests-windows
files: ./coverage.xml
flags: windows_system_extensions
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-extensions-windows
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-extensions-linux:
name: Test extensions (linux)
needs: integration-tests
runs-on: [ self-hosted, Linux, pyaedt ]
env:
ANSYSEM_ROOT252: '/usr/ansys_inc/v252/AnsysEM'
ANS_NODEPCHECK: '1'
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Set up headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
source .venv/bin/activate
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: bash
run: |
for pid in $(ps -eo pid,comm,args | grep -iE "ansys.inc|ansysem" | grep -v grep | awk '{print $1}'); do
echo "Killing PID $pid"
kill -9 "$pid"
done
- name: Run tests marked with 'extensions'
env:
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
run: |
source .venv/bin/activate
pytest ${PYTEST_ARGUMENTS} --timeout=600 tests/system/extensions
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-extensions-tests-linux
files: ./coverage.xml
flags: linux_system_extensions
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-extensions-linux
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-filter-windows:
name: Test filter solutions (windows)
needs: integration-tests
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# NOTE: Our windows runners are impacted by nodejs/node#56645 so we cannot use astral-sh/setup-uv@v7
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
.venv\Scripts\Activate.ps1
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: powershell
run: |
Get-Process | Where-Object {
$_.Path -like "*ansys inc*" -or $_.Path -like "*ansysem*"
} | ForEach-Object {
Write-Output "Killing $($_.Name) (PID: $($_.Id))"
Stop-Process -Id $_.Id -Force
}
- name: Run tests marked with 'filter_solutions'
env:
PYTHONMALLOC: malloc
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
.venv\Scripts\Activate.ps1
$args = $env:PYTEST_ARGUMENTS -split ' '
pytest @args --timeout=600 tests/system/filter_solutions
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-filter-tests-windows
files: ./coverage.xml
flags: windows_system_filter
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-filter_solutions-windows
path: junit/test-results.xml
if: ${{ always() }}
# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================
system-tests-emit-windows:
name: Test EMIT (windows)
needs: integration-tests
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# NOTE: Our windows runners are impacted by nodejs/node#56645 so we cannot use astral-sh/setup-uv@v7
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.TESTS_VERSION }}
- name: Set up uv
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
enable-cache: false
prune-cache: true
- name: Create virtual environment
run: uv venv .venv
- name: Install pyaedt and tests dependencies
env:
TESTS_VERSION: ${{ env.TESTS_VERSION }}
run: |
.venv\Scripts\Activate.ps1
uv sync --frozen --extra tests
- name: Remove Ansys processes (if any)
shell: powershell
run: |
Get-Process | Where-Object {
$_.Path -like "*ansys inc*" -or $_.Path -like "*ansysem*"
} | ForEach-Object {
Write-Output "Killing $($_.Name) (PID: $($_.Id))"
Stop-Process -Id $_.Id -Force
}
- name: Run tests marked with 'emit'
env:
PYTHONMALLOC: malloc
PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }}
run: |
.venv\Scripts\Activate.ps1
$args = $env:PYTEST_ARGUMENTS -split ' '
pytest @args --timeout=600 -v -rA --color=yes tests/system/emit
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
name: codecov-system-emit-tests-windows
files: ./coverage.xml
flags: windows_system_emit
- name: Upload pytest test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytest-emit-windows
path: junit/test-results.xml
package:
name: Package library
needs: [system-tests-solvers-windows,
system-tests-solvers-linux,
system-tests-general-windows,
system-tests-general-linux,
system-tests-visualization-windows,
system-tests-visualization-linux,
system-tests-icepak-windows,
system-tests-icepak-linux,
system-tests-layout-windows,
system-tests-layout-linux,
system-tests-extensions-windows,
system-tests-extensions-linux,
system-tests-filter-windows,
system-tests-emit-windows,
doc-build]
runs-on: ubuntu-latest
permissions:
attestations: write # Required to create and publish package attestations (SLSA provenance)
contents: read # Required to read repository content for packaging
id-token: write # Required for OIDC token generation (for provenance signing)
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
attest-provenance: true
# TODO: If we can fix the PDF issue and leverage classic ansys/release-github
release:
name: Release project
needs: [package, doc-build]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
id-token: write # Required for OIDC authentication to PyPI (trusted publisher)
contents: write # Required to create GitHub releases and upload release assets
steps:
- name: Download the library artifacts from build-library step
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ${{ env.PACKAGE_NAME }}-artifacts
path: ${{ env.PACKAGE_NAME }}-artifacts
- name: Release to PyPI using trusted publisher
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
repository-url: "https://upload.pypi.org/legacy/"
print-hash: true
packages-dir: ${{ env.PACKAGE_NAME }}-artifacts
skip-existing: false
- name: Release to GitHub
uses: ansys/actions/release-github@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
library-name: ${{ env.PACKAGE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
generate-release-notes: false
add-artifact-attestation-notes: true
upload-release-doc:
name: Upload release documentation
runs-on: ubuntu-latest
needs: [release]
permissions:
contents: write # Required to commit and push documentation to gh-pages branch
steps:
- name: Deploy the stable documentation
uses: ansys/actions/doc-deploy-stable@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}