|
21 | 21 | ANSRV_GEO_PORT: 700 |
22 | 22 | ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} |
23 | 23 | GEO_CONT_NAME: ans_geo |
| 24 | + RESET_IMAGE_CACHE: 0 |
24 | 25 |
|
25 | 26 | concurrency: |
26 | 27 | group: ${{ github.workflow }}-${{ github.ref }} |
|
33 | 34 |
|
34 | 35 | build-windows: |
35 | 36 | name: Building Geometry Service - Windows |
36 | | - runs-on: [self-hosted, pygeometry] |
| 37 | + runs-on: [self-hosted, Windows, pygeometry] |
37 | 38 | steps: |
38 | 39 | - name: Checkout repository |
39 | 40 | uses: actions/checkout@v3 |
|
70 | 71 | python -m venv .venv |
71 | 72 | .\.venv\Scripts\Activate.ps1 |
72 | 73 | python -m pip install --upgrade pip |
73 | | - pip install . |
| 74 | + pip install -e .[tests] |
74 | 75 | python -c "from ansys.geometry.core.connection.validate import validate; validate()" |
75 | 76 |
|
| 77 | + - name: Restore images cache |
| 78 | + uses: actions/cache@v3 |
| 79 | + with: |
| 80 | + path: .\tests\integration\image_cache |
| 81 | + key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }} |
| 82 | + restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }} |
| 83 | + |
| 84 | + - name: Testing |
| 85 | + run: | |
| 86 | + .\.venv\Scripts\Activate.ps1 |
| 87 | + pytest -v --use-existing-service=yes |
| 88 | +
|
76 | 89 | - name: Stop the Geometry service |
77 | 90 | if: always() |
78 | 91 | run: | |
@@ -122,9 +135,26 @@ jobs: |
122 | 135 | - name: Validate connection using PyGeometry |
123 | 136 | run: | |
124 | 137 | python -m pip install --upgrade pip |
125 | | - pip install . |
| 138 | + pip install -e .[tests] |
126 | 139 | python -c "from ansys.geometry.core.connection.validate import validate; validate()" |
127 | 140 |
|
| 141 | + - name: Restore images cache |
| 142 | + uses: actions/cache@v3 |
| 143 | + with: |
| 144 | + path: .\tests\integration\image_cache |
| 145 | + key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }} |
| 146 | + restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }} |
| 147 | + |
| 148 | + - name: Run pytest |
| 149 | + uses: ansys/actions/tests-pytest@v4 |
| 150 | + env: |
| 151 | + ALLOW_PLOTTING: true |
| 152 | + with: |
| 153 | + python-version: ${{ env.MAIN_PYTHON_VERSION }} |
| 154 | + pytest-extra-args: "--service-os=linux --use-existing-service=yes" |
| 155 | + checkout: false |
| 156 | + requires-xvfb: true |
| 157 | + |
128 | 158 | - name: Stop the Geometry service |
129 | 159 | if: always() |
130 | 160 | run: | |
|
0 commit comments