Skip to content

Bump the dependencies group across 1 directory with 7 updates #1248

Bump the dependencies group across 1 directory with 7 updates

Bump the dependencies group across 1 directory with 7 updates #1248

Workflow file for this run

name: GitHub CI
on:
pull_request:
workflow_dispatch:
push:
tags:
- "*"
branches:
- main
- release/*
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
# Following env vars when changed will "reset" the mentioned cache,
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
# You should go up in number, if you go down (or repeat a previous value)
# you might end up reusing a previous cache if it haven't been deleted already.
# It applies 7 days retention policy by default.
RESET_EXAMPLES_CACHE: 0
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
MAIN_PYTHON_VERSION: '3.10'
PYFLUENT_TIMEOUT_FORCE_EXIT: 5
PYFLUENT_LAUNCH_CONTAINER: 1
jobs:
docs-style:
name: Documentation Style Check
runs-on: ubuntu-latest
steps:
- name: Running Vale
uses: ansys/actions/doc-style@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
tests:
name: Tests and coverage
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ['3.10', '3.11', '3.12']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install OS packages
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install libegl1
- name: Install pyfluent-visualization
run: make install
- name: Test with pytest
run: make unittest
docs:
name: Documentation
needs: docs-style
runs-on: [self-hosted, pyfluent]
env:
DOC_DEPLOYMENT_IMAGE_TAG: v24.2.0
DOCUMENTATION_CNAME: 'visualization.fluent.docs.pyansys.com'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Install OS packages
run: |
sudo apt update
sudo apt install pandoc libegl1
- name: Install pyfluent-visualization
run: make install
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.BOT_APPLICATION_ID }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull Fluent docker image
run: make docker-pull
env:
FLUENT_IMAGE_TAG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
- name: Retrieve pyfluent-visualization version
run: |
echo "PYFLUENT_VISUALIZATION_VERSION=$(python -c "from ansys.fluent.visualization import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_OUTPUT
echo "pyfluent-visualization version is: $(python -c "from ansys.fluent.visualization import __version__; print(); print(__version__)" | tail -1)"
id: version
- name: Cache examples
uses: actions/cache@v4
with:
path: doc/source/examples
key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYFLUENT_VISUALIZATION_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}-${{ hashFiles('examples/**') }}-${{ github.sha }}
restore-keys: |
Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYFLUENT_VISUALIZATION_VERSION }}-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}-${{ hashFiles('examples/**') }}
- name: Generate the documentation
run: make build-doc
env:
FLUENT_IMAGE_TAG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
- name: Upload HTML Documentation
uses: actions/upload-artifact@v4
with:
name: HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
path: doc/_build/html
retention-days: 7
- name: Deploy
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'dev')
uses: ansys/actions/doc-deploy-stable@v8
with:
doc-artifact-name: 'HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}'
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
build:
name: Build library
needs: [tests, docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Add version information
run: make version-info
- name: Install dependencies and build the library
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements_build.txt
python -m build
python -m twine check dist/*
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: PyFluent-packages
path: |
dist/*.whl
dist/*.tar.gz
retention-days: 7
release:
name: Release
needs: build
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- uses: actions/download-artifact@v4
- name: Display package file list
run: ls -R
- name: Upload to Private PyPi
run: |
pip install twine
python -m twine upload --skip-existing ./**/*.whl
python -m twine upload --skip-existing ./**/*.tar.gz
env:
TWINE_USERNAME: PAT
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload
- name: Upload to Public PyPi
run: |
pip install twine
twine upload --skip-existing ./**/*.whl
python -m twine upload --skip-existing ./**/*.tar.gz
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.ANSYS_FLUENT_VISUALIZATION_PYPI_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
./**/*.whl
./**/*.tar.gz