Skip to content

Commit c0243eb

Browse files
committed
chore: remove poetry section and default to skip poetry add test
1 parent 752762c commit c0243eb

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,16 @@ jobs:
7777
DEST_SANIC: examples/sanic
7878
PYTHONDEVMODE: 1
7979
PYTEST_ARGS: "-n auto --cov=tortoise --cov-append --cov-branch --tb=native -q"
80+
- name: Test poetry add
81+
run: |
82+
uv run --no-sync pytest $PYTEST_ARGS tests/test_version.py::test_added_by_poetry_v2
83+
env:
84+
TORTOISE_TEST_POETRY_ADD: 1
85+
PYTHONDEVMODE: 1
86+
PYTEST_ARGS: "-n auto --cov=tortoise --cov-append --cov-branch --tb=native -q"
8087
- name: Upload Coverage
8188
run: |
82-
pip3 install --upgrade coveralls
83-
coveralls --service=github
89+
uvx coveralls --service=github
8490
env:
8591
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8692
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}

pyproject.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ documentation = "https://tortoise.github.io"
5151
homepage = "https://github.com/tortoise/tortoise-orm"
5252
repository = "https://github.com/tortoise/tortoise-orm.git"
5353

54-
[tool.poetry]
55-
requires-poetry = ">=2.0"
56-
packages = [
57-
{ include = "tortoise" }
58-
]
59-
version = "0.0.0"
60-
6154
[dependency-groups]
6255
dev = [
6356
# Linter tools

tests/test_version.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import importlib.metadata as importlib_metadata
2+
import os
23
import re
34
import shlex
45
import shutil
@@ -7,6 +8,7 @@
78
from pathlib import Path
89

910
from tortoise import __version__
11+
from tortoise.contrib import test
1012

1113
if sys.version_info >= (3, 11):
1214
from contextlib import chdir
@@ -45,6 +47,10 @@ def _capture_output(cmd: str) -> str:
4547
return _run_shell(cmd, text=True, capture_output=True, encoding="utf-8").stdout
4648

4749

50+
@test.skipIf(
51+
os.getenv("TORTOISE_TEST_POETRY_ADD", "").lower() not in ("1", "true", "yes", "on"),
52+
"Env 'TORTOISE_TEST_POETRY_ADD' is not true",
53+
)
4854
def test_added_by_poetry_v2(tmp_path: Path):
4955
tortoise_orm = Path(__file__).parent.resolve().parent
5056
py = "{}.{}".format(*sys.version_info)

0 commit comments

Comments
 (0)