Skip to content
Merged
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- "*"
branches:
- main
paths-ignore:
- 'doc/**'

concurrency:
group: ${{ github.ref }}
Expand Down Expand Up @@ -209,6 +211,7 @@ jobs:

build:
name: Build
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
needs: test-import
runs-on: [self-hosted, pyfluent]

Expand Down Expand Up @@ -443,6 +446,7 @@ jobs:

test:
name: Unit Testing
if: ${{ always() }}
needs: build
runs-on: ubuntu-latest
strategy:
Expand All @@ -465,38 +469,45 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Python
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

- name: Download package
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
uses: actions/download-artifact@v4
with:
name: PyFluent-packages
path: dist

- name: Install pyfluent
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
run: pip install -q --force-reinstall dist/*.whl > /dev/null

- name: Retrieve PyFluent version
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
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
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ansys-bot
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull Fluent docker image
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
run: make docker-pull
env:
FLUENT_IMAGE_TAG: ${{ matrix.image-tag }}

- name: Unit Testing
if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }}
run: make unittest-dev-${{ matrix.version }}
env:
FLUENT_IMAGE_TAG: ${{ matrix.image-tag }}
Expand Down