52 lines
1.4 KiB
TOML
52 lines
1.4 KiB
TOML
# Dev tools and tasks. Python and the Python dependencies are managed by uv.
|
|
[tools]
|
|
uv = "0.13"
|
|
|
|
[env]
|
|
# uv installs and uses the Python pinned in .python-version
|
|
UV_PYTHON_PREFERENCE = "only-managed"
|
|
|
|
[tasks.sync]
|
|
description = "Install Python and all dependencies with uv"
|
|
run = "uv sync"
|
|
|
|
[tasks.fmt]
|
|
description = "Format the code with ruff"
|
|
run = ["uv run ruff format", "uv run ruff check --fix"]
|
|
|
|
[tasks.lint]
|
|
description = "Check formatting and lint rules"
|
|
run = ["uv run ruff format --check", "uv run ruff check"]
|
|
|
|
[tasks.typecheck]
|
|
description = "Type check with ty"
|
|
run = "uv run ty check"
|
|
|
|
[tasks.test]
|
|
description = "Run the tests"
|
|
run = "uv run pytest"
|
|
|
|
[tasks.check]
|
|
description = "Everything CI would run"
|
|
depends = ["lint", "typecheck", "test"]
|
|
|
|
[tasks.build]
|
|
description = "Build the Red and Lavalink images with podman"
|
|
run = """
|
|
podman build -t localhost/dogebot-red:latest -f containers/red/Containerfile .
|
|
podman build -t localhost/dogebot-yt-cipher:bun-912033c -f containers/yt-cipher/Containerfile .
|
|
uv run dogebot-update --build-only
|
|
"""
|
|
|
|
[tasks.install]
|
|
description = "Install the quadlets for the current user (see README)"
|
|
run = "deploy/install.sh"
|
|
|
|
[tasks.update]
|
|
description = "Update Lavalink and its YouTube plugin now (normally a daily timer)"
|
|
run = "uv run dogebot-update"
|
|
|
|
[tasks.smoke]
|
|
description = "Check that the running Lavalink can still load YouTube tracks"
|
|
run = "uv run dogebot-smoke"
|