Skip to content

chore: update docs workflows to use 'uv' for dependency management (#33) #31

chore: update docs workflows to use 'uv' for dependency management (#33)

chore: update docs workflows to use 'uv' for dependency management (#33) #31

Workflow file for this run

name: "Library Checks"
on:
push:
paths:
- "discord/**"
- "requirements/**"
- "*.toml"
- "*.py"
- ".*"
branches: [master]
pull_request:
paths:
- "discord/**"
- "requirements/**"
- "*.toml"
- "*.py"
- ".*"
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: write-all
jobs:
codespell:
if: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: "Setup Python"
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: "Install uv"
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Sync dependencies
run: uv sync --no-python-downloads --group dev
- name: "Run codespell"
run:
uv run codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \
--exclude-file=".github/workflows/codespell.yml"
ruff:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: "Setup Python"
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: "Install uv"
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Sync dependencies
run: uv sync --no-python-downloads --group dev
- name: "Run ruff linter check"
run: uv run ruff check discord/
- name: "Run ruff formatter check"
run: uv run ruff format --check discord/
mypy:
if: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: "Setup Python"
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: "Install uv"
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Sync dependencies
run: uv sync --no-python-downloads --group dev
- name: "Setup cache"
id: cache-mypy
uses: actions/cache@v4
with:
path: .mypy_cache
key: mypy
- name: "Make mypy cache directory"
id: cache-dir-mypy
run: mkdir -p -v .mypy_cache
- name: "Run mypy"
run: uv run mypy --non-interactive discord/