Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install and configure Poetry
run: |
pip install -U pip poetry
poetry config virtualenvs.create false
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Run CI
run: make ci
run: uv run make ci
11 changes: 4 additions & 7 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install and configure Poetry
run: |
pip install -U pip poetry
poetry config virtualenvs.create false
- uses: astral-sh/setup-uv@v6
- name: Build dists
run: make build
- name: Pypi Publish
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

### 0.2.0

- feat: migrate from poetry to uv
- ci: activate ci workflow and add test for utils (#8)
- feat: generate schemas optionally ([#7])
- Use `asyncclick` instead of `click` ([#6])
- Only install tomlkit for Python version less than 3.11 ([#5])
- Migrate lint tool from isort+black to ruff ([#5])
- Drop support for Python3.8 ([#4])

[#8]: https://github.com/tortoise/tortoise-cli/pull/8
[#7]: https://github.com/tortoise/tortoise-cli/pull/7
[#6]: https://github.com/tortoise/tortoise-cli/pull/6
[#5]: https://github.com/tortoise/tortoise-cli/pull/5
Expand Down
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
checkfiles = tortoise_cli/ tests/ examples/ conftest.py
src_dir = tortoise_cli
checkfiles = $(src_dir) tests/ examples/ conftest.py
py_warn = PYTHONDEVMODE=1
pytest_opts = -n auto --cov=$(src_dir) --cov-append --cov-branch --tb=native -q

up:
@poetry update
@uv lock --upgrade --verbose

deps:
@poetry install --all-groups
@uv sync --inexact --all-extras --all-groups $(options)

style: deps _style
_style:
ruff format $(checkfiles)
ruff check --fix $(checkfiles)

check: deps _check
check: build _check
_check:
ruff format --check $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
ruff check $(checkfiles)
mypy $(checkfiles)
bandit -c pyproject.toml -r $(checkfiles)
twine check dist/*

test: deps _test
_test:
$(py_warn) pytest
$(py_warn) pytest $(pytest_opts)

build: deps
@poetry build
rm -fR dist/
uv build

ci: check _test
ci: build _check _test
Loading