Skip to content
Merged
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
50 changes: 49 additions & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,57 @@ jobs:
docker rm ${{ env.GEO_CONT_NAME }}
fi

testing-min-reqs:
name: Testing with minimum requirements
needs: [smoke-tests]
runs-on: ubuntu-latest
env:
ANSRV_GEO_IMAGE_MINREQS: 'ghcr.io/ansys/geometry:linux-latest'
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Login in Github Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull and launch geometry service
run: |
docker pull ${{ env.ANSRV_GEO_IMAGE_MINREQS }}
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_MINREQS }}

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install minimum requirements
run: |
python -m pip install --upgrade pip
pip install -e .[all,tests-minimal]
pip install pytest

- name: Run pytest
run: |
pytest -v

- name: Stop the Geometry service
if: always()
run: |
docker stop ${{ env.GEO_CONT_NAME }}
docker logs ${{ env.GEO_CONT_NAME }}
docker rm ${{ env.GEO_CONT_NAME }}

package:
name: Package library
needs: [testing-windows, testing-linux, docs]
needs: [testing-windows, testing-linux, testing-min-reqs, docs]
runs-on: ubuntu-latest
steps:
- name: Build library source and wheel artifacts
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/1153.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: perform minimal requirements tests
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ dependencies = [
"Pint>=0.18,<1",
"protobuf>=3.20.2,<5",
"pyvista>=0.37.0,<1",
"requests>=2,<3",
"scipy>=1.7.3,<2",
"semver>=3,<4",
"six>=1.16.0,<2",
"vtk>=9,<10",
"semver>=3,<4",
]

[project.optional-dependencies]
all = [
"ansys-platform-instancemanagement>=1.0.3,<2",
"docker>=6.0.1,<8",
"pyvista[jupyter]>=0.38.1,<0.42",
"pyvista[jupyter]>=0.38.1,<1",
]
tests = [
"ansys-platform-instancemanagement==1.1.2",
Expand All @@ -70,6 +71,12 @@ tests = [
"six==1.16.0",
"vtk==9.3.0",
]
tests-minimal = [
"pytest==8.1.1",
"pytest-cov==5.0.0",
"pytest-pyvista==0.1.9",
"pytest-xvfb==3.0.0",
]
doc = [
"ansys-sphinx-theme[autoapi]==0.15.2",
"beartype==0.18.2",
Expand Down