|
11 | 11 |
|
12 | 12 | env:
|
13 | 13 | PACKAGE_NAME: PyMAPDL
|
14 |
| - PYMAPDL_PORT: 21000 # default won't work on GitHub runners |
15 |
| - PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners |
16 |
| - PYMAPDL_START_INSTANCE: FALSE |
17 | 14 | PYANSYS_OFF_SCREEN: True
|
18 | 15 | DPF_START_SERVER: False
|
19 | 16 | DPF_PORT: 21002
|
@@ -119,6 +116,10 @@ jobs:
|
119 | 116 | docs_build:
|
120 | 117 | name: Build Documentation
|
121 | 118 | runs-on: ubuntu-latest
|
| 119 | + env: |
| 120 | + PYMAPDL_PORT: 21000 # default won't work on GitHub runners |
| 121 | + PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners |
| 122 | + PYMAPDL_START_INSTANCE: FALSE |
122 | 123 |
|
123 | 124 | steps:
|
124 | 125 | - uses: actions/checkout@v3
|
@@ -306,6 +307,10 @@ jobs:
|
306 | 307 | strategy:
|
307 | 308 | matrix:
|
308 | 309 | mapdl-version: ['v21.1.1', 'v21.2.1', 'v22.1.0', 'v22.2.0', 'v22.2-ubuntu']
|
| 310 | + env: |
| 311 | + PYMAPDL_PORT: 21000 # default won't work on GitHub runners |
| 312 | + PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners |
| 313 | + PYMAPDL_START_INSTANCE: FALSE |
309 | 314 |
|
310 | 315 | steps:
|
311 | 316 | - uses: actions/checkout@v3
|
@@ -447,6 +452,56 @@ jobs:
|
447 | 452 | if compgen -G './logs-${{ matrix.mapdl-version }}/*.log' > /dev/null ;then for f in ./logs-${{ matrix.mapdl-version }}/*.log; do echo "::group:: Log file $f" && cat $f && echo "::endgroup::" ; done; fi
|
448 | 453 | if compgen -G './logs-${{ matrix.mapdl-version }}/*.out' > /dev/null ;then for f in ./logs-${{ matrix.mapdl-version }}/*.out; do echo "::group:: Output file $f" && cat $f && echo "::endgroup::" ; done; fi
|
449 | 454 |
|
| 455 | + test_windows: |
| 456 | + name: Unit Testing on Windows |
| 457 | + runs-on: [self-hosted, Windows, pymapdl] |
| 458 | + |
| 459 | + steps: |
| 460 | + - uses: actions/checkout@v3 |
| 461 | + |
| 462 | + # - name: Setup Python |
| 463 | + |
| 464 | + # with: |
| 465 | + # python-version: 3.9 |
| 466 | + |
| 467 | + - name: Checking python_ |
| 468 | + shell: powershell |
| 469 | + run: | |
| 470 | + python -m pip install --upgrade pip |
| 471 | + |
| 472 | + - name: Creating python venv |
| 473 | + run: | |
| 474 | + python -m venv .\.venv |
| 475 | + .\.venv\Scripts\activate |
| 476 | +
|
| 477 | + - name: Install ansys-mapdl-core |
| 478 | + shell: powershell |
| 479 | + run: | |
| 480 | + python -m pip install build |
| 481 | + python -m build |
| 482 | + $FILE_=Resolve-Path '.\dist\*.whl' |
| 483 | + python -m pip install $FILE_.Path --upgrade |
| 484 | + python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())" |
| 485 | +
|
| 486 | + - name: Unit Testing Requirements Installation |
| 487 | + shell: powershell |
| 488 | + run: | |
| 489 | + python -m pip install .[tests] |
| 490 | +
|
| 491 | + # - name: DPF Server Activation |
| 492 | + # run: | |
| 493 | + # docker pull ghcr.io/pyansys/dpf-core:22.2dev |
| 494 | + # docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/pyansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}." |
| 495 | + |
| 496 | + - name: Unit Testing |
| 497 | + run: | |
| 498 | + set PYMAPDL_PORT= |
| 499 | + set PYMAPDL_START_INSTANCE= |
| 500 | + python -m pytest -v -k "not test_database and not test_dpf" --durations=10 --maxfail=10 --reruns 7 --reruns-delay 3 --only-rerun MapdlExitedError --cov=ansys.mapdl.core --cov-report=xml --cov-report=html |
| 501 | +
|
| 502 | + - uses: codecov/codecov-action@v3 |
| 503 | + name: 'Upload coverage to Codecov' |
| 504 | + |
450 | 505 | Release:
|
451 | 506 | if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
|
452 | 507 | needs: [docs_build, build_test]
|
|
0 commit comments