Skip to content

Test Run WO Codegen Weekly #85

Test Run WO Codegen Weekly

Test Run WO Codegen Weekly #85

name: Test Run WO Codegen Weekly
on:
schedule: # UTC at 0900 on Sunday
- cron: "0 9 * * SUN"
workflow_dispatch:
permissions:
contents: read
packages: read
pull-requests: read
issues: read
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
PYFLUENT_TIMEOUT_FORCE_EXIT: 30
PYTEST_XDIST_AUTO_NUM_WORKERS: 1
PYFLUENT_LAUNCH_CONTAINER: 1
PYFLUENT_LOGGING: "DEBUG"
PYFLUENT_WATCHDOG_DEBUG: "OFF"
PYFLUENT_HIDE_LOG_SECRETS: 1
PYTHON_VERSION: "3.10"
jobs:
build:
name: Build package
runs-on: [self-hosted, pyfluent]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache pip
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.cache/pip
key: Python-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
Python-${{ runner.os }}-${{ env.PYTHON_VERSION }}
- name: Add version information
run: make version-info
- name: Install pyfluent
run: make install
- name: Retrieve PyFluent version
run: |
echo "PYFLUENT_VERSION=$(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_OUTPUT
echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)"
id: version
- name: Check package
run: |
pip install twine
twine check dist/*
- name: Upload package
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: PyFluent-packages
path: |
dist/*.whl
dist/*.tar.gz
retention-days: 7
test:
name: Unit Testing
needs: build
runs-on: [self-hosted, pyfluent]
strategy:
fail-fast: false
matrix:
include:
- image-tag: v22.2.0
version: 222
- image-tag: v23.1.0
version: 231
- image-tag: v23.2.0
version: 232
- image-tag: v24.1.0
version: 241
- image-tag: v24.2.0
version: 242
- image-tag: v25.1.0
version: 251
- image-tag: v25.2.0
version: 252
- image-tag: v26.1.0
version: 261
env:
FLUENT_IMAGE_TAG: ${{ matrix.version == 261 && vars.FLUENT_STABLE_IMAGE_DEV || matrix.image-tag }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Download package
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: PyFluent-packages
path: dist
- name: Install pyfluent
run: pip install -q --force-reinstall dist/*.whl > /dev/null
- name: Retrieve PyFluent version
run: |
echo "PYFLUENT_VERSION=$(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_OUTPUT
echo "PYFLUENT version is: $(python -c "from ansys.fluent.core import __version__; print(); print(__version__)" | tail -1)"
id: version
- name: Login to GitHub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ansys-bot
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull Fluent docker image
run: make docker-pull
- name: Unit Testing
env:
VERSION: ${{ matrix.version }}
run: |
make install-test
make unittest-all-${VERSION}-no-codegen
- name: Cleanup previous docker containers
if: always()
run: make cleanup-previous-docker-containers
- name: Remove all docker images
if: always()
run: make docker-clean-images