diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 14f02ba..17a92de 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,20 +12,14 @@ jobs: strategy: matrix: python-version: ["3.11"] - poetry-version: ["1.8.3"] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v3 with: - python-version: ${{ matrix.python-version }} - cache: pip - - uses: narumiruna/setup-poetry@v1 - with: - poetry-version: ${{ matrix.poetry-version }} - cache: true + enable-cache: true - name: Publish env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} + UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} run: | - poetry build -f wheel - poetry publish + uv build --wheel + uv publish diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index a3a9960..ba8d3e5 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -15,26 +15,22 @@ jobs: strategy: matrix: python-version: ["3.11"] - poetry-version: ["1.8.3"] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v3 with: - python-version: ${{ matrix.python-version }} - cache: pip - - uses: narumiruna/setup-poetry@v1 - with: - poetry-version: ${{ matrix.poetry-version }} - cache: true + enable-cache: true + - name: Install Python + run: uv python install ${{ matrix.python-version }} - name: Install dependencies - run: poetry install + run: uv sync - name: Lint - run: poetry run ruff check . + run: uv run ruff check . - name: Type check - run: poetry run mypy --install-types --non-interactive . + run: uv run mypy --install-types --non-interactive . - name: Test - run: poetry run pytest -v -s --cov=. --cov-report=xml tests + run: uv run pytest -v -s --cov=src --cov-report=xml tests - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Makefile b/Makefile index c0ae117..42e1e7a 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ -install: - poetry install - lint: - poetry run ruff check . + uv run ruff check . test: - poetry run pytest -v -s --cov=. tests + uv run pytest -v -s --cov=src tests + +type: + uv run mypy --install-types --non-interactive . publish: - poetry build -f wheel - poetry publish + uv build --wheel + uv publish .PHONY: lint test publish