ci: rework workflows for uv

This commit is contained in:
2025-07-14 17:26:27 +02:00
parent 74effef60c
commit c1e4afc683
4 changed files with 138 additions and 85 deletions

48
.github/workflows/pr_checks.yaml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: PR Checks
on:
pull_request:
branches:
- '*'
jobs:
comment_coverage:
name: Comment coverage on PR
runs-on: ubuntu-latest
steps:
- name: 🔀 checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: "${{ secrets.GITHUB_TOKEN }}"
submodules: 'recursive'
- name: 📦 install uv
uses: astral-sh/setup-uv@v5
- name: 🐍 python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: 📦 sync depedencies
run: |
uv sync
uv sync --group test
- name: configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: 🧪 run coverage
run: |
uv run pytest --cov --junitxml=pytest.xml --cov-report=term-missing | tee pytest-coverage.txt
continue-on-error: true
- name: 📊 comment coverage
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: pytest-coverage.txt
junitxml-path: pytest.xml