Simplify this for now without many groups, add Python version to enable the caching better?

This commit is contained in:
Trenton Holmes 2025-03-01 19:19:18 -08:00 committed by Trenton H
parent c02c621328
commit 645c5f0e8e
2 changed files with 12 additions and 13 deletions

View File

@ -63,17 +63,17 @@ jobs:
with: with:
version: ${{ env.DEFAULT_UV_VERSION }} version: ${{ env.DEFAULT_UV_VERSION }}
enable-cache: true enable-cache: true
cache-suffix: "docs-${{ env.DEFAULT_PYTHON_VERSION }}" python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- -
name: Install Python dependencies name: Install Python dependencies
run: | run: |
uv sync --python ${{ steps.setup-python.outputs.python-version }} --only-group docs --frozen uv sync --python ${{ steps.setup-python.outputs.python-version }} --dev --frozen
- -
name: Make documentation name: Make documentation
run: | run: |
uv run \ uv run \
--python ${{ steps.setup-python.outputs.python-version }} \ --python ${{ steps.setup-python.outputs.python-version }} \
--only-group docs \ --dev \
--frozen \ --frozen \
mkdocs build --config-file ./mkdocs.yml mkdocs build --config-file ./mkdocs.yml
- -
@ -85,7 +85,7 @@ jobs:
git config --global user.email "${{ github.actor }}@users.noreply.github.com" git config --global user.email "${{ github.actor }}@users.noreply.github.com"
uv run \ uv run \
--python ${{ steps.setup-python.outputs.python-version }} \ --python ${{ steps.setup-python.outputs.python-version }} \
--only-group docs \ --dev \
--frozen \ --frozen \
mkdocs gh-deploy --force --no-history mkdocs gh-deploy --force --no-history
- -
@ -126,7 +126,7 @@ jobs:
with: with:
version: ${{ env.DEFAULT_UV_VERSION }} version: ${{ env.DEFAULT_UV_VERSION }}
enable-cache: true enable-cache: true
cache-suffix: "tests-${{ matrix.python-version }}" python-version: ${{ steps.setup-python.outputs.python-version }}
- -
name: Install system dependencies name: Install system dependencies
run: | run: |
@ -159,7 +159,7 @@ jobs:
cd src/ cd src/
uv run \ uv run \
--python ${{ steps.setup-python.outputs.python-version }} \ --python ${{ steps.setup-python.outputs.python-version }} \
--group testing \ --dev \
--frozen \ --frozen \
pytest -ra pytest -ra
- -
@ -481,13 +481,14 @@ jobs:
id: setup-python id: setup-python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }} python-version:
- -
name: Install uv name: Install uv
uses: astral-sh/setup-uv@v5 uses: astral-sh/setup-uv@v5
with: with:
version: ${{ env.DEFAULT_UV_VERSION }} version: ${{ env.DEFAULT_UV_VERSION }}
enable-cache: true enable-cache: true
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- -
name: Install Python dependencies name: Install Python dependencies
run: | run: |
@ -657,6 +658,7 @@ jobs:
with: with:
version: ${{ env.DEFAULT_UV_VERSION }} version: ${{ env.DEFAULT_UV_VERSION }}
enable-cache: true enable-cache: true
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- -
name: Append Changelog to docs name: Append Changelog to docs
id: append-Changelog id: append-Changelog
@ -674,7 +676,7 @@ jobs:
mv changelog-new.md changelog.md mv changelog-new.md changelog.md
uv run \ uv run \
--python ${{ steps.setup-python.outputs.python-version }} \ --python ${{ steps.setup-python.outputs.python-version }} \
--only-group lint \ --dev \
pre-commit run --files changelog.md || true pre-commit run --files changelog.md || true
git config --global user.name "github-actions" git config --global user.name "github-actions"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"

View File

@ -38,6 +38,7 @@ dependencies = [
"filelock~=3.17.0", "filelock~=3.17.0",
"flower~=2.0.1", "flower~=2.0.1",
"gotenberg-client~=0.9.0", "gotenberg-client~=0.9.0",
"granian~=1.7.6",
"httpx-oauth~=0.16", "httpx-oauth~=0.16",
"imap-tools~=1.10.0", "imap-tools~=1.10.0",
"inotifyrecursive~=0.3", "inotifyrecursive~=0.3",
@ -67,18 +68,14 @@ dependencies = [
"zxing-cpp~=2.3.0", "zxing-cpp~=2.3.0",
] ]
optional-dependencies.webserver = [ # TODO: Move certain things to groups and then utilize that further
"granian~=1.7.6",
]
[dependency-groups] [dependency-groups]
dev = [ dev = [
{ "include-group" = "docs" }, { "include-group" = "docs" },
{ "include-group" = "testing" }, { "include-group" = "testing" },
{ "include-group" = "typing" },
{ "include-group" = "lint" }, { "include-group" = "lint" },
"deptry>=0.15.0",
] ]
testing = [ testing = [