Skip to content

Commit 0d63972

Browse files
committed
feat: integrate poe for task management in CI/CD workflows
1 parent a4a7a24 commit 0d63972

4 files changed

Lines changed: 74 additions & 7 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Generate API documentation
3030
working-directory: sdk
31-
run: uv run pydoc-markdown
31+
run: uv run poe docs
3232

3333
- name: Checkout docs
3434
uses: actions/checkout@v6

.github/workflows/python.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: astral-sh/setup-uv@v7
1717

1818
- name: Check formatting
19-
run: uv run ruff format --check .
19+
run: uv run poe format
2020

2121
- name: Lint code
22-
run: uv run ruff check .
22+
run: uv run poe lint
2323

2424
type-check:
2525
name: Type Check
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install dependencies
3434
run: uv sync
3535
- name: Run ty
36-
run: uv run ty check
36+
run: uv run poe typecheck
3737

3838
test:
3939
name: Test Python ${{ matrix.python-version }}
@@ -50,7 +50,7 @@ jobs:
5050
- name: Install dependencies
5151
run: uv sync
5252
- name: Run tests with coverage
53-
run: uv run pytest tests/unit/ -v --cov=src/fishaudio --cov-report=xml --cov-report=term
53+
run: uv run poe test
5454
- name: Upload coverage to Codecov
5555
uses: codecov/codecov-action@v5
5656
if: matrix.python-version == '3'
@@ -74,7 +74,7 @@ jobs:
7474
run: uv sync
7575

7676
- name: Run integration tests
77-
run: uv run pytest tests/integration/ -v
77+
run: uv run poe test-integration
7878
env:
7979
FISH_API_KEY: ${{ secrets.FISH_API_KEY }}
8080

@@ -94,7 +94,7 @@ jobs:
9494
- name: Install uv
9595
uses: astral-sh/setup-uv@v7
9696
- name: Build package
97-
run: uv build
97+
run: uv run poe build
9898
- name: Check package
9999
run: uv run python -c "import fishaudio; print(f'fishaudio v{fishaudio.__version__}')"
100100
- name: Upload build artifacts

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ asyncio_mode = "auto"
5757
[dependency-groups]
5858
dev = [
5959
"fish-audio-sdk[utils]",
60+
"poethepoet>=0.32.0",
6061
"pydoc-markdown>=4.8.2",
6162
"pytest>=8.3.5",
6263
"pytest-asyncio>=0.24.0",
@@ -112,5 +113,24 @@ runtime-evaluated-base-classes = ["pydantic.BaseModel"]
112113
[tool.ruff.lint.pyupgrade]
113114
keep-runtime-typing = true
114115

116+
[tool.poe.tasks]
117+
lint = "ruff check ."
118+
format = "ruff format --check ."
119+
typecheck = "ty check"
120+
check = ["lint", "format", "typecheck"]
121+
122+
lint-fix = "ruff check --fix ."
123+
format-fix = "ruff format ."
124+
fix = ["lint-fix", "format-fix"]
125+
126+
test = "pytest tests/unit/ -v --cov=src/fishaudio --cov-report=xml --cov-report=term"
127+
test-integration = "pytest tests/integration/ -v"
128+
129+
docs = "pydoc-markdown"
130+
131+
[tool.poe.tasks.build]
132+
cmd = "uv build"
133+
executor = {type = "simple"}
134+
115135
[tool.uv.sources]
116136
fish-audio-sdk = { workspace = true }

uv.lock

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)