Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,20 @@ jobs:
- name: Install pyvistaqt requirements
run: make install-pyvistaqt-requirements

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.REPO_DOWNLOAD_PAT }}

- name: Pull Fluent docker image
run: make docker-pull

- name: Unit Testing
run: make unittest
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}

- name: Check package
run: |
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ install-pyvistaqt-requirements:
test-import:
@python -c "import ansys.fluent.core as pyfluent"

docker-pull:
@docker pull ghcr.io/pyansys/pyfluent:latest

unittest:
@echo "Running unittest"
@pip install -r requirements_test.txt
Expand Down
18 changes: 18 additions & 0 deletions tests/docker/test_server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os
import subprocess
from time import sleep


def test_fluent_server():
license_server = os.getenv("LICENSE_SERVER", "leblnxlic64.ansys.com")
subprocess.run(["docker", "run", "-d", "--rm", "-p", "63084:63084",
"-e", f"ANSYSLMD_LICENSE_FILE=1055@{license_server}",
"-e", "REMOTING_PORTS=63084/portspan=2",
"-e", "FLUENT_LAUNCHED_FROM_PYFLUENT=1",
"ghcr.io/pyansys/pyfluent", "3ddp", "-g",
"-sifile=server.txt"])
sleep(60)
from ansys.fluent.core.session import Session
session = Session("localhost", 63084)
assert session.check_health() == "SERVING"
session.exit()