Skip to content

Bump the github-actions-dependencies group across 1 directory with 5 updates #3263

Bump the github-actions-dependencies group across 1 directory with 5 updates

Bump the github-actions-dependencies group across 1 directory with 5 updates #3263

Workflow file for this run

name: GitHub CI
# run only on main branch. This avoids duplicated actions on PRs
on:
pull_request:
push:
tags:
- "*"
branches:
- main
workflow_dispatch:
inputs:
docker_image_suffix:
description: "Suffix of the 'acp' docker image used for testing. For example, ':latest', or '@sha256:<hash>' (without quotes)."
required: false
permissions:
contents: read
env:
MAIN_PYTHON_VERSION: "3.14"
PACKAGE_NAME: "ansys-acp-core"
DOCUMENTATION_CNAME: "acp.docs.pyansys.com"
DOCKER_IMAGE_NAME: "ghcr.io/ansys/acp${{ github.event.inputs.docker_image_suffix || ':latest' }}"
UV_LOCKED: "true"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-style:
name: "Pre-commit Check"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
enable-cache: false
- name: Run pre-commit
run: |
uv run pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
doc-style:
name: "Documentation style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/doc-style@v10.3.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
build-wheelhouse:
name: "Build wheelhouse"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.11', '3.12', '3.13', '3.14']
should-release:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
exclude:
- should-release: false
os: macos-latest
steps:
- name: "Build wheelhouse and perform smoke test"
uses: ansys/actions/build-wheelhouse@v10.3.5
with:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
check-vulnerabilities:
name: "Check library vulnerabilities"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/check-vulnerabilities@v10.3.5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
python-package-name: 'ansys-acp-core'
dev-mode: ${{ github.ref != 'refs/heads/main' }}
extra-targets: "graphics"
check-actions-security:
name: "Check actions security"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/check-actions-security@v10.3.5
with:
generate-summary: true
token: ${{ secrets.GITHUB_TOKEN }}
auditing-level: 'high'
trust-ansys-actions: true
testing-direct-launch:
name: Testing with direct launch mode
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
packages: read # needed for pulling the Docker image
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Login in Github Container registry
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Python version is determined by the Docker image
- name: Build docker image
run: docker build -t test_runner -f dockerfiles/DirectLaunchTest.Dockerfile .
- name: Run tests
run: |
docker run \
--mount type=bind,source="$(pwd)",target=/home/container/pyacp \
-u $(id -u):$(id -g) \
-e ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE \
test_runner
env:
ANSYSLMD_LICENSE_FILE: "1055@${{ secrets.LICENSE_SERVER }}"
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
flags: 'direct-launch,server-latest'
testing-minimum-deps:
name: Testing with minimum dependencies
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ["3.11", "3.12", '3.13', '3.14']
server-version: ["latest"]
permissions:
packages: read # needed for pulling the Docker image
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: false
- name: Install library, with only the 'main' group
run: uv sync --no-dev --no-group test
- name: Check that PyACP can be imported
run: |
uv run --no-sync python -c "import ansys.acp.core"
- name: Install the 'test' group
run: uv sync --group test --no-dev
- name: Login in Github Container registry
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Unit testing
working-directory: tests/unittests
run: |
docker pull $IMAGE_NAME
uv run --no-sync pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --cov=ansys.acp.core --cov-report=term --cov-report=xml --cov-report=html -m "not graphics"
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
IMAGE_NAME: ghcr.io/ansys/acp:${{ matrix.server-version }}
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
flags: 'server-${{ matrix.server-version }},python-${{ matrix.python-version }},minimum-deps'
testing:
name: Testing
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
packages: read # needed for pulling the Docker image
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", '3.13', '3.14']
server-version: ["latest"]
include:
- python-version: "3.14"
server-version: "2024R2SP5"
- python-version: "3.14"
server-version: "2025R1SP4"
- python-version: "3.14"
server-version: "2025R2SP3"
- python-version: "3.14"
server-version: "2026R1"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: false
- name: Install library, with test group and graphics extra
run: uv sync --group test --extra graphics --no-dev
- name: Login in Github Container registry
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Unit testing
working-directory: tests/unittests
run: |
docker pull $IMAGE_NAME
uv run --no-sync pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --cov=ansys.acp.core --cov-report=term --cov-report=xml --cov-report=html
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
IMAGE_NAME: ghcr.io/ansys/acp:${{ matrix.server-version }}
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
flags: 'server-${{ matrix.server-version }},python-${{ matrix.python-version }}'
- name: Benchmarks
working-directory: tests/benchmarks
run: |
benchmark_mode_args=""
if [ "$RUN_FULL_BENCHMARKS" != "true" ]; then
benchmark_mode_args="--validate-benchmarks-only"
fi
uv run --no-sync pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --build-benchmark-image --benchmark-json benchmark_output.json --benchmark-group-by=fullname $benchmark_mode_args
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
IMAGE_NAME: ghcr.io/ansys/acp:${{ matrix.server-version }}
RUN_FULL_BENCHMARKS: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION && matrix.server-version == 'latest' }}
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@52576c92bccf6ac60c8223ec7eb2565637cae9ba # v1.22.1
with:
name: 'PyACP benchmarks'
tool: 'pytest'
output-file-path: tests/benchmarks/benchmark_output.json
benchmark-data-dir-path: benchmarks
auto-push: true
github-token: ${{ secrets.GITHUB_TOKEN }}
if: matrix.python-version == env.MAIN_PYTHON_VERSION && matrix.server-version == 'latest' && github.ref == 'refs/heads/main'
doctest:
name: Test documentation snippets
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
packages: read # needed for pulling the Docker image
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
enable-cache: false
- name: Install library, with test,dev groups
run: uv sync --all-groups --all-extras
- name: Login in Github Container registry
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install OS packages
run: |
sudo apt update
sudo apt-get install pandoc
- name: Set up headless display
uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3
- name: Configure Local Product Launcher for ACP
working-directory: tests/unittests
run: >
uv run --no-sync ansys-launcher configure ACP docker_compose
--image_name_acp=${DOCKER_IMAGE_NAME}
--image_name_filetransfer=ghcr.io/ansys/tools-filetransfer:latest
--license_server=1055@$LICENSE_SERVER
--transport_mode=mtls
--certs_dir=null
--keep_volume=False
--overwrite_default
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
- name: Run doctest
run: |
docker pull ${DOCKER_IMAGE_NAME}
docker pull ghcr.io/ansys/tools-filetransfer:latest
uv run --no-sync make -C doc doctest
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
PYACP_DOC_SKIP_GALLERY: "true"
PYACP_DOC_SKIP_API: "true"
ANSYS_GRPC_CERTIFICATES: ${{ github.workspace }}/tests/insecure_certs
docs:
name: Build Documentation
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
packages: read # needed for pulling the Docker image
strategy:
matrix:
build_type: ["quick", "full"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
enable-cache: false
- name: Install OS packages
run: |
sudo apt update
sudo apt-get install pandoc
- name: Set up headless display
uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3
- name: Install library, with dev group
run: uv sync --group dev --all-extras --no-group test
- name: Configure Local Product Launcher for ACP
run: >
uv run --no-sync ansys-launcher configure ACP docker_compose
--image_name_acp=${DOCKER_IMAGE_NAME}
--image_name_filetransfer=ghcr.io/ansys/tools-filetransfer:latest
--license_server=1055@$LICENSE_SERVER
--transport_mode=mtls
--certs_dir=null
--keep_volume=False
--overwrite_default
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
if: ${{ matrix.build_type == 'full' }}
- name: Login in Github Container registry (PYANSYS_CI_BOT)
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
with:
registry: ghcr.io
username: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
password: ${{ secrets.PYANSYS_CI_BOT_PACKAGE_TOKEN }}
if: ${{ matrix.build_type == 'full' }}
- name: Launch MAPDL and DPF servers via docker-compose, pull images
run: |
docker compose -f ./docker-compose/docker-compose-extras.yaml up -d
env:
ANSYSLMD_LICENSE_FILE: "1055@${{ secrets.LICENSE_SERVER }}"
ANSYS_DPF_ACCEPT_LA: "Y"
if: ${{ matrix.build_type == 'full' }}
- name: Pull ACP and filetransfer images
run: |
docker pull ${DOCKER_IMAGE_NAME}
docker pull ghcr.io/ansys/tools-filetransfer:latest
if: ${{ matrix.build_type == 'full' }}
- name: Build HTML
run: |
uv run --no-sync make -C doc html SPHINXOPTS="-W --keep-going -v $SPHINXOPT_NITPICKY"
env:
PYMAPDL_IP: "127.0.0.1"
PYMAPDL_PORT: "50557"
PYMAPDL_START_INSTANCE: "FALSE"
PYMAPDL_GRPC_TRANSPORT: "insecure"
PYDPF_COMPOSITES_DOCKER_CONTAINER_PORT: "50558"
SPHINXOPT_NITPICKY: ${{ matrix.build_type == 'quick' && ' ' || '-n' }}
PYACP_DOC_SKIP_GALLERY: ${{ matrix.build_type == 'quick' && 'true' || 'false' }}
PYACP_DOC_SKIP_API: ${{ matrix.build_type == 'quick' && 'true' || 'false' }}
ANSYS_GRPC_CERTIFICATES: ${{ github.workspace }}/tests/insecure_certs
DPF_DEFAULT_GRPC_MODE: "insecure"
- name: Stop and clean up MAPDL and DPF servers
run: |
docker compose -f ./docker-compose/docker-compose-extras.yaml down -v
- name: Upload HTML Documentation
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: documentation-html
path: doc/build/html
retention-days: 7
if: ${{ matrix.build_type == 'full' }}
- name: Install OS packages for PDF build
run: |
sudo apt update
sudo apt install build-essential zip pandoc texlive-latex-extra latexmk texlive-pstricks
if: ${{ matrix.build_type == 'full' }}
- name: Restart MAPDL and DPF servers via docker compose
run: |
docker compose -f ./docker-compose/docker-compose-extras.yaml up -d
env:
ANSYSLMD_LICENSE_FILE: "1055@${{ secrets.LICENSE_SERVER }}"
ANSYS_DPF_ACCEPT_LA: "Y"
if: ${{ matrix.build_type == 'full' }}
- name: Build PDF Documentation
run: uv run --no-sync make -C doc pdf
if: ${{ matrix.build_type == 'full' }}
- name: Upload PDF Documentation
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: documentation-pdf
path: doc/build/latex/ansys-acp-core.pdf
retention-days: 7
if: ${{ matrix.build_type == 'full' }}
build:
name: Build library
runs-on: ubuntu-latest
needs:
- build-wheelhouse
- check-actions-security
- check-vulnerabilities
- code-style
- doc-style
- docs
- doctest
- testing
- testing-direct-launch
- testing-minimum-deps
timeout-minutes: 30
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@v10.3.5
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
release:
name: Release project
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [build]
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write # trusted publishers require these permissions
contents: write # trusted publishers require these permissions
steps:
- name: "Download the library artifacts from build-library step"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ env.PACKAGE_NAME }}-artifacts
path: ${{ env.PACKAGE_NAME }}-artifacts
- name: "Upload artifacts to PyPI using trusted publisher"
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
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@v10.3.5
with:
library-name: ${{ env.PACKAGE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
upload_docs_dev:
name: "Upload dev documentation"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: write # needs to write to the gh-pages branch
steps:
- name: Deploy the latest documentation
uses: ansys/actions/doc-deploy-dev@v10.3.5
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
upload_docs_release:
name: Upload release documentation
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [release]
permissions:
contents: write # needs to write to the gh-pages branch
steps:
- name: Deploy the stable documentation
uses: ansys/actions/doc-deploy-stable@v10.3.5
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}