diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 362e5bbf826..3247c2f3c6a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -4,32 +4,11 @@ on: # GitHub default types + ready_for_review to trigger the workflow on PRs no longer in draft mode. # See https://github.com/ansys/pyaedt/issues/5223 for more information types: [opened, synchronize, reopened, ready_for_review] - workflow_dispatch: env: - ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} - MAIN_PYTHON_VERSION: '3.13' - TESTS_VERSION: '3.10' PACKAGE_NAME: 'PyAEDT' DOCUMENTATION_CNAME: 'aedt.docs.pyansys.com' - PYAEDT_DOC_BUILD_CHEATSHEET: False ON_CI: True - PYTEST_ARGUMENTS: -vvv --color=yes -ra --durations=25 --maxfail=10 --junitxml=junit/test-results.xml --testmon - PYTEST_ARGUMENTS_NON_TESTMON: -vvv --color=yes -ra --durations=25 --maxfail=10 --junitxml=junit/test-results.xml - PYAEDT_LOCAL_SETTINGS_PATH: 'tests/pyaedt_settings.yaml' - TESTMON_DATAFILE: '.testmondata' - TESTMON_CACHE_KEY_SOLVERS_WIN: 'testmondata-solvers-win' - TESTMON_CACHE_KEY_SOLVERS_LINUX: 'testmondata-solvers-linux' - TESTMON_CACHE_KEY_GENERAL_WIN: 'testmondata-general-win' - TESTMON_CACHE_KEY_GENERAL_LINUX: 'testmondata-general-linux' - TESTMON_CACHE_KEY_VISUALIZATION_WIN: 'testmondata-visualization-win' - TESTMON_CACHE_KEY_VISUALIZATION_LINUX: 'testmondata-visualization-linux' - TESTMON_CACHE_KEY_ICEPAK_WIN: 'testmondata-icepak-win' - TESTMON_CACHE_KEY_ICEPAK_LINUX: 'testmondata-icepak-linux' - TESTMON_CACHE_KEY_LAYOUT_WIN: 'testmondata-layout-win' - TESTMON_CACHE_KEY_LAYOUT_LINUX: 'testmondata-layout-linux' - TESTMON_CACHE_KEY_FILTER_WIN: 'testmondata-filter-win' - TESTMON_CACHE_KEY_EMIT_WIN: 'testmondata-emit-win' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -41,183 +20,6 @@ permissions: {} jobs: - # NOTE: We do not allow dependabot to trigger the CI/CD pipeline automatically. - # This is to mitigate supply chain attacks, where a malicious dependency update - # could execute arbitrary code in our build environment. - # Dependabot PRs must be reviewed carefully and approved manually before - # running the CI. - block-dependabot: - name: "Block dependabot (on dependabot PR)" - runs-on: ubuntu-latest - steps: - - name: Exit if dependabot triggered the workflow # zizmor: ignore[bot-conditions] safe ignore because we exit if dependabot is triggering the action - if: github.triggering_actor == 'dependabot[bot]' - run: | - echo "::warning::Dependabot is not allowed to trigger this workflow. Please review carefully the changes before running the workflow manually." - exit 1 - - - # NOTE: We do not allow the pre-commit-ci bot to trigger the CI/CD pipeline - # automatically on PR it creates. - # This is to mitigate supply chain attacks, where a malicious dependency update - # could execute arbitrary code in our build environment. - # PRs opened by the pre-commit-ci bot must be reviewed carefully and approved - # manually before running the CI. - block-pre-commit-ci-bot-PR: - name: "Block pre-commit-ci bot (on pre-commit-ci bot PR only)" - runs-on: ubuntu-latest - steps: - - name: Exit if pre-commit-ci bot triggered the workflow # zizmor: ignore[bot-conditions] safe ignore because we exit if pre-commit-ci bot is triggering the action - if: github.triggering_actor == 'pre-commit-ci[bot]' && github.event.pull_request.head.ref == 'pre-commit-ci-update-config' - run: | - echo "::warning::pre-commit-ci bot is not allowed to trigger this workflow. Please review carefully the changes before running the workflow manually." - exit 1 - - - # NOTE: We do not allow pyansys-ci-bot to trigger the CI/CD pipeline automatically - # on dependabot's and pre-commit-ci bot's PR. This is to mitigate supply chain attacks, - # where a malicious dependency update could execute arbitrary code in our build environment. - # Dependabot and pre-commit-ci bot PRs must be reviewed carefully and approved manually before - # running the CI. - block-pyansys-ci-bot: - name: "Block PyAnsys-CI-bot (on dependabot and pre-commit-ci bot PR)" - needs: [block-dependabot, block-pre-commit-ci-bot-PR] - runs-on: ubuntu-latest - steps: - - name: Exit if pyansys-ci-bot triggered the workflow on dependabot's PR - if: github.triggering_actor == 'pyansys-ci-bot' && startsWith(github.head_ref, 'dependabot') - run: | - echo "::warning::PyAnsys CI bot is not allowed to trigger this workflow in dependabot's PR. Please review carefully the changes before running the workflow manually." - exit 1 - - name: Exit if pyansys-ci-bot triggered the workflow on pre-commit-ci bot's PR - if: github.triggering_actor == 'pyansys-ci-bot' && github.event.pull_request.head.ref == 'pre-commit-ci-update-config' - run: | - echo "::warning::PyAnsys CI bot is not allowed to trigger this workflow in pre-commit-ci bot's PR. Please review carefully the changes before running the workflow manually." - exit 1 - - - vulnerabilities: - name: "Vulnerabilities" - runs-on: ubuntu-latest - needs: [block-pyansys-ci-bot] - permissions: - contents: read # Required to read repository content for vulnerability scanning - steps: - - uses: ansys/actions/check-vulnerabilities@7d55ff0b9f67c77dae50a286d711ee1ae27b0a25 # v10.2.12 - with: - dev-mode: ${{ github.ref != 'refs/heads/main' }} - extra-targets: 'all' - python-version: ${{ env.MAIN_PYTHON_VERSION }} - python-package-name: ${{ env.PACKAGE_NAME }} - token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} - - actions-security: - name: "Check actions security" - runs-on: ubuntu-latest - needs: [block-pyansys-ci-bot] - permissions: - contents: read # Required to read workflow files and check for security issues - steps: - - uses: ansys/actions/check-actions-security@7d55ff0b9f67c77dae50a286d711ee1ae27b0a25 # v10.2.12 - with: - generate-summary: true - token: ${{ secrets.GITHUB_TOKEN }} - auditing-level: 'high' - - pr-title: - name: Check the title of the PR (if needed) - runs-on: ubuntu-latest - needs: [block-pyansys-ci-bot] - permissions: - pull-requests: read # Required to read PR metadata - steps: - - name: Check the title of the pull request - if: github.event_name == 'pull_request' - uses: ansys/actions/check-pr-title@7d55ff0b9f67c77dae50a286d711ee1ae27b0a25 # v10.2.12 - with: - token: ${{ secrets.GITHUB_TOKEN }} - use-upper-case: true - - name: Check the title of the pull request - if: github.event_name != 'pull_request' - shell: bash - run: echo "::notice::Skipping PR title check for non-PR events" - - analyze-changes: - name: Analyze code changes - runs-on: ubuntu-latest - needs: [pr-title] - outputs: - skip_tests: ${{ steps.analyze.outputs.skip_tests }} - doc_only: ${{ steps.analyze.outputs.doc_only }} - run_all: ${{ steps.analyze.outputs.run_all }} - emit_changed: ${{ steps.analyze.outputs.emit_changed }} - extensions_changed: ${{ steps.analyze.outputs.extensions_changed }} - filter_solutions_changed: ${{ steps.analyze.outputs.filter_solutions_changed }} - permissions: - contents: read # Required to read repository content and git history - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - fetch-depth: 0 # Need full history for git diff - persist-credentials: false - - - name: Setup Python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Set up uv - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: false - prune-cache: true - - - name: Analyze changes - id: analyze - shell: bash - run: | - # Run the analyze-changes script in CI mode - python .ci/scripts/analyze_changes.py --base origin/main - - # If no outputs were set, default to run_all=true - if [ ! -f "$GITHUB_OUTPUT" ] || ! grep -q "skip_tests\|doc_only\|run_all" "$GITHUB_OUTPUT" 2>/dev/null; then - echo "run_all=true" >> $GITHUB_OUTPUT - echo "skip_tests=false" >> $GITHUB_OUTPUT - echo "doc_only=false" >> $GITHUB_OUTPUT - fi - - doc-style: - name: Documentation style check - runs-on: ubuntu-latest - needs: [analyze-changes] - permissions: - contents: read # Required to read documentation files for style checking - steps: - - name: Check documentation style - uses: ansys/actions/doc-style@7d55ff0b9f67c77dae50a286d711ee1ae27b0a25 # v10.2.12 - 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@7d55ff0b9f67c77dae50a286d711ee1ae27b0a25 # v10.2.12 - 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: false - optional-dependencies-name: 'all' - group-dependencies-name: 'doc' - smoke-tests: name: Build wheelhouse and smoke tests runs-on: ${{ matrix.os }} @@ -225,7 +27,6 @@ jobs: 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) - needs: [analyze-changes] strategy: fail-fast: false matrix: @@ -235,7 +36,7 @@ jobs: steps: - name: Build wheelhouse and perform smoke test id: build-wheelhouse - uses: ansys/actions/build-wheelhouse@7d55ff0b9f67c77dae50a286d711ee1ae27b0a25 # v10.2.12 + uses: ansys/actions/build-wheelhouse@chore/bump-syft-version-into-v1.45.0 with: attest-provenance: true library-name: ${{ env.PACKAGE_NAME }} @@ -252,1118 +53,3 @@ jobs: run: | ${ACTIVATE_VENV} python -c "import ansys.aedt.core; from ansys.aedt.core import __version__" - - - unit-tests: - name: Unit tests - needs: [smoke-tests, analyze-changes] - if: needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Run unit tests - env: - PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS_NON_TESTMON }} - run: | - source .venv/bin/activate - xvfb-run pytest ${PYTEST_ARGUMENTS_NON_TESTMON} tests/unit - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pytest-unit - path: junit/test-results.xml - if: ${{ always() }} - - integration-tests: - name: Integration tests - needs: [unit-tests, analyze-changes] - if: needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Run integration tests - env: - PYTEST_ARGUMENTS_NON_TESTMON: ${{ env.PYTEST_ARGUMENTS_NON_TESTMON }} - run: | - source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS_NON_TESTMON} tests/integration - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_SOLVERS_WIN }} - - - 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 - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT261: '/usr/ansys_inc/v261/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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_SOLVERS_LINUX }} - - - 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: - PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }} - run: | - source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} --timeout=600 tests/system/solvers - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: false - prune-cache: true - - - name: Set up headless display - uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3 - - - 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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_GENERAL_WIN }} - - - 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 - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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) - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - needs: [integration-tests, analyze-changes] - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT261: '/usr/ansys_inc/v261/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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: false - prune-cache: true - - - name: Set up headless display - uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3 - - - 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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_GENERAL_LINUX }} - - - 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' - run: | - source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} -n 4 --dist loadfile --timeout=600 tests/system/general - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: false - prune-cache: true - - - name: Set up headless display - uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3 - - - 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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_VISUALIZATION_WIN }} - - - 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 - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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) - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - needs: [integration-tests, analyze-changes] - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT261: '/usr/ansys_inc/v261/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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: false - prune-cache: true - - - name: Set up headless display - uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3 - - - 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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_VISUALIZATION_LINUX }} - - - 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' - run: | - source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} -n 4 --dist loadfile --timeout=300 tests/system/visualization -x - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_ICEPAK_WIN }} - - - 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 - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT261: '/usr/ansys_inc/v261/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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_ICEPAK_LINUX }} - - - 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: - PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }} - run: | - source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} --timeout=600 tests/system/icepak - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_LAYOUT_WIN }} - - - 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 - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT261: '/usr/ansys_inc/v261/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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: false - prune-cache: true - - - name: Create virtual environment - run: uv venv .venv - - - name: Install pyaedt and tests dependencies - run: | - source .venv/bin/activate - uv sync --frozen --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_LAYOUT_LINUX }} - - - 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: - PYTEST_ARGUMENTS: ${{ env.PYTEST_ARGUMENTS }} - run: | - source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS} --timeout=600 tests/system/layout - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pytest-layout-linux - path: junit/test-results.xml - if: ${{ always() }} - -# ================================================================================================= -# vvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -# ================================================================================================= - - system-tests-extensions-windows: - name: Test extensions (windows) - needs: [integration-tests, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' && needs.analyze-changes.outputs.extensions_changed == 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: false - prune-cache: true - - - name: Set up headless display - uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3 - - - 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 --group tests --extra all - - - 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_NON_TESTMON: ${{ env.PYTEST_ARGUMENTS_NON_TESTMON }} - run: | - .venv\Scripts\Activate.ps1 - $args = $env:PYTEST_ARGUMENTS_NON_TESTMON -split ' ' - pytest @args --timeout=600 tests/system/extensions - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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) - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' && needs.analyze-changes.outputs.extensions_changed == 'true' - needs: [integration-tests, analyze-changes] - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT261: '/usr/ansys_inc/v261/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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: false - prune-cache: true - - - name: Set up headless display - uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3 - - - 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 --group tests --extra all - - - 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' - run: | - source .venv/bin/activate - pytest ${PYTEST_ARGUMENTS_NON_TESTMON} --timeout=600 tests/system/extensions - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - -# - name: Restore testmondata cache -# uses: ./.github/actions/testmon-cache -# with: -# testmon-datafile: ${{ env.TESTMON_DATAFILE }} -# cache-key: ${{ env.TESTMON_CACHE_KEY_FILTER_WIN }} - - - 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 - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - 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, analyze-changes] - if: github.event.pull_request.draft == false && needs.analyze-changes.outputs.skip_tests != 'true' - 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.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 --group tests --extra all - - - name: Wait for master cache update - uses: ./.github/actions/check-cache - - - name: Restore testmondata cache - uses: ./.github/actions/testmon-cache - with: - testmon-datafile: ${{ env.TESTMON_DATAFILE }} - cache-key: ${{ env.TESTMON_CACHE_KEY_EMIT_WIN }} - - - 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 - - - name: Upload pytest test results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pytest-emit-windows - path: junit/test-results.xml - - package: - name: Package library - needs: [analyze-changes, - 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 - if: | - always() && - !contains(needs.*.result, 'failure') && - !contains(needs.*.result, 'cancelled') - 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@7d55ff0b9f67c77dae50a286d711ee1ae27b0a25 # v10.2.12 - with: - attest-provenance: true - library-name: ${{ env.PACKAGE_NAME }} - python-version: ${{ env.MAIN_PYTHON_VERSION }} - use-python-cache: false \ No newline at end of file