Skip to content

Commit 5ba1d3f

Browse files
committed
Merge branch 'master' into viewless-components
2 parents 6c6c225 + 5d63352 commit 5ba1d3f

File tree

10 files changed

+642
-479
lines changed

10 files changed

+642
-479
lines changed

.github/actions/sync-uv/action.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: 'Sync UV Action'
2+
description: 'Install and sync UV with specified groups and extras'
3+
author: 'Pycord Development <[email protected]>'
4+
inputs:
5+
groups:
6+
description: "Comma-separated list of groups to sync"
7+
required: false
8+
default: ''
9+
extras:
10+
description: "Comma-separated list of extras to sync"
11+
required: false
12+
default: ''
13+
frozen:
14+
description: "Whether to sync with frozen dependencies"
15+
required: false
16+
default: 'true'
17+
no_python_downloads:
18+
description: "Whether to avoid downloading Python versions"
19+
required: false
20+
default: 'true'
21+
22+
runs:
23+
using: "composite"
24+
steps:
25+
- name: "Install uv"
26+
uses: astral-sh/setup-uv@v7
27+
with:
28+
enable-cache: true
29+
30+
- name: "Run UV sync"
31+
shell: bash
32+
run: |
33+
cmd_args=("uv" "sync")
34+
35+
# groups
36+
set +e
37+
if [ -n "${{ inputs.groups }}" ]; then
38+
IFS=',' read -ra PARSED_GROUPS <<< "${{ inputs.groups }}"
39+
for group in "${PARSED_GROUPS[@]}"; do
40+
group=$(echo "$group" | xargs)
41+
if [ -n "$group" ]; then
42+
cmd_args+=("--group" "$group")
43+
fi
44+
done
45+
fi
46+
set -e
47+
echo "Groups: ${PARSED_GROUPS[*]}"
48+
49+
# extras
50+
set +e
51+
if [ -n "${{ inputs.extras }}" ]; then
52+
IFS=',' read -ra PARSED_EXTRAS <<< "${{ inputs.extras }}"
53+
for extra in "${PARSED_EXTRAS[@]}"; do
54+
extra=$(echo "$extra" | xargs)
55+
if [ -n "$extra" ]; then
56+
cmd_args+=("--extra" "$extra")
57+
fi
58+
done
59+
fi
60+
set -e
61+
echo "Extras: ${PARSED_EXTRAS[*]}"
62+
63+
echo "Executing: ${cmd_args[*]}"
64+
"${cmd_args[@]}"
65+
env:
66+
UV_NO_PYTHON_DOWNLOADS: ${{ inputs.no_python_downloads == 'true' && '1' || '' }}
67+
UV_FROZEN: ${{ inputs.frozen == 'true' && '1' || '' }}

.github/workflows/docs-checks.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ jobs:
4040
- name: "Setup Python"
4141
uses: actions/setup-python@v6
4242
with:
43-
python-version: "3.14"
44-
- name: "Install uv"
45-
uses: astral-sh/setup-uv@v7
43+
python-version: "3.13"
44+
- name: "Setup UV"
45+
uses: ./.github/actions/sync-uv
4646
with:
47-
enable-cache: true
48-
- name: Sync dependencies
49-
run: uv sync --no-python-downloads --group dev --group docs
47+
groups: 'dev,docs'
5048
- name: "Check Links"
5149
env:
5250
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build

.github/workflows/docs-localization-download.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ jobs:
1919
- name: "Setup Python"
2020
uses: actions/setup-python@v6
2121
with:
22-
python-version: "3.14"
23-
- name: "Install uv"
24-
uses: astral-sh/setup-uv@v7
22+
python-version: "3.13"
23+
- name: "Setup UV"
24+
uses: ./.github/actions/sync-uv
2525
with:
26-
enable-cache: true
27-
- name: Sync dependencies
28-
run: uv sync --no-python-downloads --group dev --group docs --extra speed --extra voice
26+
groups: 'dev,docs'
27+
extras: 'speed,voice'
2928
- name: "Get locales"
3029
env:
3130
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build
@@ -41,7 +40,7 @@ jobs:
4140
working-directory: ./docs
4241
- name: "Crowdin"
4342
id: crowdin
44-
uses: crowdin/github-action@v2.11.0
43+
uses: crowdin/github-action@v2.12.0
4544
with:
4645
upload_sources: false
4746
upload_translations: false

.github/workflows/docs-localization-upload.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ jobs:
2424
- name: "Setup Python"
2525
uses: actions/setup-python@v6
2626
with:
27-
python-version: "3.14"
28-
- name: "Install uv"
29-
uses: astral-sh/setup-uv@v7
27+
python-version: "3.13"
28+
- name: "Setup UV"
29+
uses: ./.github/actions/sync-uv
3030
with:
31-
enable-cache: true
32-
- name: Sync dependencies
33-
run: uv sync --no-python-downloads --group dev --group docs --extra speed --extra voice
31+
groups: 'dev,docs'
32+
extras: 'speed,voice'
3433
- name: "Get locales"
3534
env:
3635
SPHINXBUILD: ${{ github.workspace }}/.venv/bin/sphinx-build
@@ -45,7 +44,7 @@ jobs:
4544
sphinx-intl update -p ./build/locales ${{ vars.SPHINX_LANGUAGES }}
4645
working-directory: ./docs
4746
- name: "Crowdin"
48-
uses: crowdin/github-action@v2.11.0
47+
uses: crowdin/github-action@v2.12.0
4948
with:
5049
upload_sources: true
5150
upload_translations: false

.github/workflows/lib-checks.yml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ jobs:
4040
- name: "Setup Python"
4141
uses: actions/setup-python@v6
4242
with:
43-
python-version: "3.14"
44-
- name: "Install uv"
45-
uses: astral-sh/setup-uv@v7
43+
python-version: "3.13"
44+
- name: "Setup UV"
45+
uses: ./.github/actions/sync-uv
4646
with:
47-
enable-cache: true
48-
- name: Sync dependencies
49-
run: uv sync --no-python-downloads --group dev
47+
groups: 'dev'
5048
- name: "Run codespell"
5149
run:
5250
uv run codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \
@@ -60,13 +58,11 @@ jobs:
6058
- name: "Setup Python"
6159
uses: actions/setup-python@v6
6260
with:
63-
python-version: "3.14"
64-
- name: "Install uv"
65-
uses: astral-sh/setup-uv@v7
61+
python-version: "3.13"
62+
- name: "Setup UV"
63+
uses: ./.github/actions/sync-uv
6664
with:
67-
enable-cache: true
68-
- name: Sync dependencies
69-
run: uv sync --no-python-downloads --group dev
65+
groups: 'dev'
7066
- name: "Run ruff linter check"
7167
run: uv run ruff check .
7268
- name: "Run ruff formatter check"
@@ -80,13 +76,11 @@ jobs:
8076
- name: "Setup Python"
8177
uses: actions/setup-python@v6
8278
with:
83-
python-version: "3.14"
84-
- name: "Install uv"
85-
uses: astral-sh/setup-uv@v7
79+
python-version: "3.13"
80+
- name: "Setup UV"
81+
uses: ./.github/actions/sync-uv
8682
with:
87-
enable-cache: true
88-
- name: Sync dependencies
89-
run: uv sync --no-python-downloads --group dev
83+
groups: 'dev'
9084
- name: "Setup cache"
9185
id: cache-mypy
9286
uses: actions/cache@v4
@@ -107,20 +101,17 @@ jobs:
107101
python-version: ['3.13', '3.12', '3.11', '3.10']
108102
steps:
109103
- name: "Checkout Repository"
110-
uses: actions/checkout@v4
104+
uses: actions/checkout@v5
111105

112106
- name: "Setup Python"
113-
uses: actions/setup-python@v5
107+
uses: actions/setup-python@v6
114108
with:
115109
python-version: ${{ matrix.python-version }}
116110

117-
- name: "Install uv"
118-
uses: astral-sh/setup-uv@v6
111+
- name: "Setup UV"
112+
uses: ./.github/actions/sync-uv
119113
with:
120-
enable-cache: true
121-
122-
- name: Sync dependencies
123-
run: uv sync --no-python-downloads --group dev
114+
groups: 'dev'
124115

125116
- name: "Run tests"
126117
run: uv run tox

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
name: "Check PR Dependencies"
1818
steps:
1919
- name: PR Dependency Check
20-
uses: gregsdennis/[email protected]
20+
uses: gregsdennis/dependencies-action@ae6e0529ef70f1366a21972f40b1ad0e1b5e3218 # v1.4.1
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2323
semantic-title:
2424
name: "Check Semantic Title"
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: "Check Semantic Pull Request"
28-
uses: amannn/[email protected]
28+
uses: amannn/action-semantic-pull-request@fdd4d3ddf614fbcd8c29e4b106d3bbe0cb2c605d # v6.1.1
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sync-guild-features.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ jobs:
2323
- name: "Setup Python"
2424
uses: actions/setup-python@v6
2525
with:
26-
python-version: "3.14"
27-
- name: "Install uv"
28-
uses: astral-sh/setup-uv@v7
26+
python-version: "3.13"
27+
- name: "Setup UV"
28+
uses: ./.github/actions/sync-uv
2929
with:
30-
enable-cache: true
31-
- name: Sync dependencies
32-
run: uv sync --no-python-downloads --group dev --group ci
30+
groups: 'dev,ci'
3331
- name: "Run guild features sync"
3432
run: uv run python -m scripts.sync_guild_features
3533
env:

.github/workflows/todo-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: "Checkout Repository"
2424
uses: actions/checkout@v5
2525
- name: "Track TODO Action"
26-
uses: ribtoks/[email protected]
26+
uses: ribtoks/tdg-github-action@bb998752af7ac294aa9350895908ae7eac3f1c1d # v0.4.15-beta
2727
with:
2828
TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
REPO: ${{ github.repository }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ dev = [
7979
]
8080

8181
test = [# Not in `dev` because we use tox for testing. Tox will install these dependencies.
82-
"pytest~=8.3.5",
82+
"pytest~=8.4.2",
8383
"pytest-asyncio~=0.24.0",
8484
]
8585
ci = [

0 commit comments

Comments
 (0)