Skip to content

Bump sphinx-toolbox from 3.5.0 to 3.6.0 (#557) #1438

Bump sphinx-toolbox from 3.5.0 to 3.6.0 (#557)

Bump sphinx-toolbox from 3.5.0 to 3.6.0 (#557) #1438

Workflow file for this run

name: Pre-merge checks
on:
pull_request:
push:
tags:
- "*"
branches:
- main
workflow_dispatch:
merge_group:
env:
MAIN_PYTHON_VERSION: '3.9'
DOCUMENTATION_CNAME: 'bomanalytics.grantami.docs.pyansys.com'
LIBRARY_NAME: 'ansys-grantami-bomanalytics'
LIBRARY_NAMESPACE: 'ansys.grantami.bomanalytics'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-style:
name: "Code style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/code-style@v6
with:
skip-install: false
doc-style:
name: "Documentation style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/doc-style@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
doc-build:
name: Documentation Build (mock examples)
runs-on: ubuntu-latest
steps:
- name: "Run Ansys documentation building action"
uses: ansys/actions/doc-build@v6
with:
check-links: false
dependencies: "pandoc"
sphinxopts: "-n -W --keep-going"
- name: "Delete unneeded doc artifact"
if: ${{ !startsWith( github.event.pull_request.head.ref, 'dependabot/') }}
uses: geekyeggo/delete-artifact@v5
with:
name: |
documentation-html
documentation-pdf
smoke-tests:
name: "Build wheelhouse for latest Python versions"
runs-on: ${{ matrix.os }}
needs: code-style
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: ansys/actions/build-wheelhouse@v6
with:
library-name: ${{ env.LIBRARY_NAME }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
tests:
name: "Tests Python ${{ matrix.python-version }}, ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
needs: smoke-tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
fail-fast: false
steps:
- name: "Checkout the repository"
uses: actions/checkout@v4
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install Python dependencies"
run: |
python -m pip install --upgrade pip poetry tox
- name: "Test with tox"
run: tox -e "tests" -- -m "not integration"
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
if: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION && !startsWith( github.event.pull_request.head.ref, 'dependabot/') }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: .cov/xml
flags: unittests
fail_ci_if_error: true
build-library:
name: "Build library"
runs-on: ubuntu-latest
needs: [ doc-build, tests]
steps:
- uses: ansys/actions/build-library@v6
with:
library-name: ${{ env.LIBRARY_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
server-checks:
name: "Server checks"
needs: [ smoke-tests ]
if: ${{ !startsWith( github.event.pull_request.head.ref, 'dependabot/') }}
uses: ./.github/workflows/server_checks.yml
with:
skip-vm-management: ${{ vars.SKIP_VM_MANAGEMENT == 'true' }}
secrets:
inherit
doc-deploy-dev:
name: "Deploy development documentation"
runs-on: ubuntu-latest
needs: [server-checks]
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags')
steps:
- uses: ansys/actions/doc-deploy-dev@v6
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
doc-artifact-name: documentation-html
update-changelog:
name: "Update CHANGELOG for new tag"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: ansys/actions/doc-deploy-changelog@v6
with:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
release:
name: "Release"
runs-on: ubuntu-latest
needs: [build-library, server-checks, update-changelog]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
permissions:
id-token: write
contents: write
steps:
- uses: ansys/actions/release-pypi-public@v6
name: "Release to public PyPI"
with:
library-name: ${{ env.LIBRARY_NAME }}
use-trusted-publisher: true
- uses: ansys/actions/release-github@v6
name: "Release to GitHub"
with:
library-name: ${{ env.LIBRARY_NAME }}
doc-deploy-stable:
name: "Deploy stable documentation"
runs-on: ubuntu-latest
needs: release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
steps:
- uses: ansys/actions/doc-deploy-stable@v6
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
doc-artifact-name: documentation-html