Skip to content

Test Run Nightly

Test Run Nightly #698

name: Test Run Nightly
on:
schedule: # UTC at 0400
- cron: "0 4 * * *"
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"
FLUENT_IMAGE_TAG: v26.1.latest
FLUENT_VERSION: 261
jobs:
test:
name: Unit Testing
runs-on: [self-hosted, pyfluent]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Clean Docker Data
run: make docker-clean-all-except-supported-images
env:
FLUENT_STABLE_IMAGE_DEV: ${{ vars.FLUENT_STABLE_IMAGE_DEV }}
- name: Cache pip
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
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: 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
env:
FLUENT_IMAGE_TAG: ${{ env.FLUENT_IMAGE_TAG }}
- name: Run API codegen
run: make api-codegen
env:
FLUENT_IMAGE_TAG: ${{ env.FLUENT_IMAGE_TAG }}
- name: Print Fluent version info
env:
VERSION: ${{ env.FLUENT_VERSION }}
run: |
cat src/ansys/fluent/core/generated/fluent_version_${VERSION}.py
python -c "from ansys.fluent.core.generated.solver.settings_${VERSION} import SHASH; print(f'SETTINGS_HASH = {SHASH}')"
- name: Install again after codegen
run: |
rm -rf dist
make install > /dev/null
- name: Unit Testing
run: |
make install-test
make unittest-all-${VERSION}
env:
FLUENT_IMAGE_TAG: ${{ env.FLUENT_IMAGE_TAG }}
VERSION: ${{ env.FLUENT_VERSION }}
- name: Upload Coverage Results to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
root_dir: ${{ github.workspace }}
name: cov_xml.xml
- name: Upload Coverage Artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: coverage_report
path: ./htmlcov
- name: Clean Docker Data
run: make docker-clean-all-except-supported-images
env:
FLUENT_STABLE_IMAGE_DEV: ${{ vars.FLUENT_STABLE_IMAGE_DEV }}