Skip to content
Snippets Groups Projects

Use uv in CI

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

Files

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