Skip to content
Snippets Groups Projects

Use uv in CI

Closed Tobias Hangleiter requested to merge ci/uv-pip into main
All threads resolved!

Files

@@ -3,22 +3,27 @@ image: python:3.8-slim
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
UV_CACHE_DIR: "$CI_PROJECT_DIR/.cache/uv"
PIP_ROOT_USER_ACTION: "ignore"
cache:
paths:
- .cache/pip
- venv/
- .cache/uv
before_script:
- python -m pip install virtualenv
- python -m virtualenv venv
- source venv/bin/activate
- python -m pip install --upgrade pip
- python -m pip install hatch
- python -m pip install uv
- python -m uv pip install hatch
test:
script:
- python -m hatch run tests:run
artifacts:
when: always
paths:
- pytest_report.xml
reports:
junit: pytest_report.xml
build:
script:
@@ -44,8 +49,7 @@ pypi:
- job: "build"
artifacts: true
script:
- pip install -U twine
- twine upload -u "$TWINE_USERNAME" -p "$TWINE_PASSWORD" dist/*
- python -m hatch publish -y
rules:
- if: '$CI_COMMIT_TAG =~ /^v\d{4}\.\d{1,2}\.\d{1,2}$/'
# Always publish tagged commits matching CalVer
Loading