|
39 | 39 | TRIVY_VULNDB: "/home/runner/.local/share/containers/trivy_db"
|
40 | 40 | # Targets (and their folder) that should be scanned using FS instead of IMAGE scan due to resource constraints
|
41 | 41 | TRIVY_SCAN_FS_JSON: '{}'
|
42 |
| - # Poetry version for use in running tests |
43 |
| - POETRY_VERSION: '2.0.0' |
44 | 42 |
|
45 | 43 | steps:
|
46 | 44 |
|
@@ -315,33 +313,26 @@ jobs:
|
315 | 313 |
|
316 | 314 | # region Pytest image tests
|
317 | 315 |
|
318 |
| - - name: Install poetry |
319 |
| - if: steps.cache-poetry-restore.outputs.cache-hit != 'true' |
320 |
| - run: pipx install poetry==${{ env.POETRY_VERSION }} |
321 |
| - env: |
322 |
| - PIPX_HOME: /home/runner/.local/pipx |
323 |
| - PIPX_BIN_DIR: /home/runner/.local/bin |
324 |
| - |
325 |
| - - name: Check poetry is installed correctly |
326 |
| - run: poetry env info |
327 |
| - |
328 |
| - - name: Set up Python |
329 |
| - id: setup-python |
330 |
| - uses: actions/setup-python@v5 |
| 316 | + # https://github.com/astral-sh/setup-uv |
| 317 | + - name: Install the latest version of uv |
| 318 | + uses: astral-sh/setup-uv@v5 |
331 | 319 | with:
|
332 |
| - python-version: '3.12' |
333 |
| - cache: 'poetry' |
| 320 | + version: "latest" |
| 321 | + python-version: "3.12" |
| 322 | + enable-cache: true |
| 323 | + cache-dependency-glob: "uv.lock" |
| 324 | + pyproject-file: "pyproject.toml" |
334 | 325 |
|
335 |
| - - name: Configure poetry |
336 |
| - run: poetry env use "${{ steps.setup-python.outputs.python-path }}" |
| 326 | + - name: Check uv is installed correctly |
| 327 | + run: uv version |
337 | 328 |
|
338 | 329 | - name: Install deps
|
339 |
| - run: poetry install --sync |
| 330 | + run: uv sync --locked |
340 | 331 |
|
341 | 332 | - name: Run Testcontainers container tests (in PyTest)
|
342 | 333 | run: |
|
343 | 334 | set -Eeuxo pipefail
|
344 |
| - poetry run pytest --capture=fd tests/containers -m 'not openshift' --image="${{ steps.calculated_vars.outputs.OUTPUT_IMAGE }}" |
| 335 | + uv run pytest --capture=fd tests/containers -m 'not openshift' --image="${{ steps.calculated_vars.outputs.OUTPUT_IMAGE }}" |
345 | 336 | env:
|
346 | 337 | DOCKER_HOST: "unix:///var/run/podman/podman.sock"
|
347 | 338 | TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE: "/var/run/podman/podman.sock"
|
@@ -511,7 +502,7 @@ jobs:
|
511 | 502 | if: ${{ steps.have-tests.outputs.tests == 'true' }}
|
512 | 503 | run: |
|
513 | 504 | set -Eeuxo pipefail
|
514 |
| - poetry run pytest --capture=fd tests/containers -m 'openshift' --image="${{ steps.calculated_vars.outputs.OUTPUT_IMAGE }}" |
| 505 | + uv run pytest --capture=fd tests/containers -m 'openshift' --image="${{ steps.calculated_vars.outputs.OUTPUT_IMAGE }}" |
515 | 506 | env:
|
516 | 507 | # TODO(jdanek): this Testcontainers stuff should not be necessary but currently it has to be there
|
517 | 508 | DOCKER_HOST: "unix:///var/run/podman/podman.sock"
|
|
0 commit comments