ci: Switch to uv
CI / unit-tests (push) Successful in 1m5s
CI / integration-tests (push) Failing after 47s
CI / publish (push) Has been skipped

This commit is contained in:
2026-05-04 11:19:55 +02:00
parent 4ee0cda29a
commit 909b238cab
+28 -22
View File
@@ -7,47 +7,53 @@ on:
branches: ["main"] branches: ["main"]
jobs: jobs:
test: unit-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: astral-sh/setup-uv@v5
with: with:
python-version: "3.12" enable-cache: true
- name: Install dependencies - name: Run unit tests
run: | run: uv run --extra dev pytest tests/unit/ -v --tb=short
python -m venv .venv
.venv/bin/pip install -e ".[dev]" -q
- name: Run tests integration-tests:
run: .venv/bin/pytest tests/ -v runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Pull container image
run: docker pull python:3.11-slim
- name: Run integration tests
run: uv run --extra dev pytest tests/integration/ -v --tb=short
publish: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test needs: [unit-tests, integration-tests]
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: astral-sh/setup-uv@v5
with: with:
python-version: "3.12" enable-cache: true
- name: Build package - name: Build package
run: | run: uv build
pip install build -q
python -m build
- name: Publish to Gitea package registry - name: Publish to Gitea package registry
env: env:
TWINE_USERNAME: ${{ github.repository_owner }} UV_PUBLISH_URL: ${{ gitea.server_url }}/api/packages/${{ github.repository_owner }}/pypi
TWINE_PASSWORD: ${{ secrets.GITEA_TOKEN }} UV_PUBLISH_USERNAME: ${{ github.repository_owner }}
run: | UV_PUBLISH_PASSWORD: ${{ secrets.GITEA_TOKEN }}
pip install twine -q run: uv publish
twine upload \
--repository-url ${{ gitea.server_url }}/api/packages/${{ github.repository_owner }}/pypi \
dist/*