Skip to content

Commit

Permalink
Switch to setuptools + uv (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
sciyoshi committed Apr 21, 2024
1 parent d3dd91e commit c708b2e
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 842 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/lint.yml

This file was deleted.

23 changes: 8 additions & 15 deletions .github/workflows/release.yml
Expand Up @@ -12,21 +12,14 @@ jobs:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: cache poetry install
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-3.11-0
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Build and publish package
run: |
poetry build
python-version: "3.12"
- run: pip install uv
- run: uv venv
- run: uv pip install --requirement pyproject.toml
- run: uv pip install setuptools wheel build
- run: .venv/bin/python -m build --no-isolation
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
49 changes: 24 additions & 25 deletions .github/workflows/test.yml
@@ -1,4 +1,4 @@
name: Test
name: CI

on:
push:
Expand All @@ -11,30 +11,29 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: cache poetry install
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ matrix.python-version }}-0
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache deps
id: cache-deps
uses: actions/cache@v3
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- run: poetry install --no-interaction
- run: poetry run pytest --cov=./prosemirror/
- run: poetry run codecov
if: matrix.python-version == '3.11'
- run: pip install uv
- run: uv venv
- run: uv pip install --requirement pyproject.toml --all-extras
- run: .venv/bin/pytest --cov=./prosemirror/
- run: .venv/bin/codecov
if: matrix.python-version == '3.11'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install uv
- run: uv venv
- run: uv pip install --requirement pyproject.toml --all-extras
- run: .venv/bin/ruff format --check prosemirror tests
- run: .venv/bin/ruff prosemirror tests
- run: .venv/bin/mypy prosemirror

0 comments on commit c708b2e

Please sign in to comment.