Skip to content

build(pyproject): migrate to uv #334

build(pyproject): migrate to uv

build(pyproject): migrate to uv #334

Workflow file for this run

name: test
on: [push, pull_request]
permissions:
contents: read
jobs:
unit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv sync --extra test
- name: Run tests and collect coverage
run: |
uv run coverage run -m pytest
uv run coverage report
uv run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
integration:
runs-on: ubuntu-latest
strategy:
matrix:
command:
- python-cli-template
- python-cli-template --name test
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install tool
run: uv tool install .
- name: Run command
run: ${{ matrix.command }}
- name: Get version
run: |
VERSION=$(grep version src/python_cli_template/__init__.py | cut -d'"' -f 2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Check version
run: |
set -e
[[ $(python-cli-template --version) == "$VERSION" ]]
[[ $(python-cli-template -v) == "$VERSION" ]]