Skip to content

Commit 0ff8a6d

Browse files
RobPasMuepre-commit-ci[bot]pyansys-ci-bot
authored
ci: perform minimal requirements tests (#1153)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <pyansys.github.bot@ansys.com>
1 parent 1e1be1c commit 0ff8a6d

File tree

3 files changed

+59
-3
lines changed

3 files changed

+59
-3
lines changed

.github/workflows/ci_cd.yml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,57 @@ jobs:
437437
docker rm ${{ env.GEO_CONT_NAME }}
438438
fi
439439
440+
testing-min-reqs:
441+
name: Testing with minimum requirements
442+
needs: [smoke-tests]
443+
runs-on: ubuntu-latest
444+
env:
445+
ANSRV_GEO_IMAGE_MINREQS: 'ghcr.io/ansys/geometry:linux-latest'
446+
strategy:
447+
fail-fast: false
448+
matrix:
449+
python-version: ['3.9', '3.10', '3.11', '3.12']
450+
steps:
451+
- name: Login in Github Container registry
452+
uses: docker/login-action@v3
453+
with:
454+
registry: ghcr.io
455+
username: ${{ github.actor }}
456+
password: ${{ secrets.GITHUB_TOKEN }}
457+
458+
- name: Pull and launch geometry service
459+
run: |
460+
docker pull ${{ env.ANSRV_GEO_IMAGE_MINREQS }}
461+
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 }}
462+
463+
- name: Checkout repository
464+
uses: actions/checkout@v4
465+
466+
- name: Setup Python ${{ matrix.python-version }}
467+
uses: actions/setup-python@v5
468+
with:
469+
python-version: ${{ matrix.python-version }}
470+
471+
- name: Install minimum requirements
472+
run: |
473+
python -m pip install --upgrade pip
474+
pip install -e .[all,tests-minimal]
475+
pip install pytest
476+
477+
- name: Run pytest
478+
run: |
479+
pytest -v
480+
481+
- name: Stop the Geometry service
482+
if: always()
483+
run: |
484+
docker stop ${{ env.GEO_CONT_NAME }}
485+
docker logs ${{ env.GEO_CONT_NAME }}
486+
docker rm ${{ env.GEO_CONT_NAME }}
487+
440488
package:
441489
name: Package library
442-
needs: [testing-windows, testing-linux, docs]
490+
needs: [testing-windows, testing-linux, testing-min-reqs, docs]
443491
runs-on: ubuntu-latest
444492
steps:
445493
- name: Build library source and wheel artifacts

doc/changelog.d/1153.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ci: perform minimal requirements tests

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@ dependencies = [
3535
"Pint>=0.18,<1",
3636
"protobuf>=3.20.2,<5",
3737
"pyvista>=0.37.0,<1",
38+
"requests>=2,<3",
3839
"scipy>=1.7.3,<2",
40+
"semver>=3,<4",
3941
"six>=1.16.0,<2",
4042
"vtk>=9,<10",
41-
"semver>=3,<4",
4243
]
4344

4445
[project.optional-dependencies]
4546
all = [
4647
"ansys-platform-instancemanagement>=1.0.3,<2",
4748
"docker>=6.0.1,<8",
48-
"pyvista[jupyter]>=0.38.1,<0.42",
49+
"pyvista[jupyter]>=0.38.1,<1",
4950
]
5051
tests = [
5152
"ansys-platform-instancemanagement==1.1.2",
@@ -70,6 +71,12 @@ tests = [
7071
"six==1.16.0",
7172
"vtk==9.3.0",
7273
]
74+
tests-minimal = [
75+
"pytest==8.1.1",
76+
"pytest-cov==5.0.0",
77+
"pytest-pyvista==0.1.9",
78+
"pytest-xvfb==3.0.0",
79+
]
7380
doc = [
7481
"ansys-sphinx-theme[autoapi]==0.15.2",
7582
"beartype==0.18.2",

0 commit comments

Comments
 (0)