-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
82 changed files
with
560 additions
and
753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# force LF for pyproject to make hashFiles in CI consistent (windows <3) | ||
# (see https://github.com/actions/runner/issues/498) | ||
pyproject.toml text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Configure PDM cache | ||
description: . | ||
inputs: | ||
env-already-initialized: | ||
description: Whether Python/PDM is already configured | ||
required: false | ||
default: 'true' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Get metadata for cache | ||
id: get-cache-meta | ||
shell: bash | ||
run: | | ||
echo "date=$(date -u "+%Y%m%d")" >> $GITHUB_OUTPUT | ||
- name: Setup/Restore cache | ||
id: cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
pdm.lock | ||
# cache lockfile for the current day, roughly | ||
key: pdm-${{ steps.get-cache-meta.outputs.date }}-${{ hashFiles('pyproject.toml') }} | ||
# pdm lockfiles should be platform-agnostic | ||
enableCrossOsArchive: true | ||
|
||
- if: ${{ steps.cache.outputs.cache-hit != 'true' && inputs.env-already-initialized != 'true' }} | ||
name: Set up PDM | ||
uses: pdm-project/setup-pdm@v4 | ||
with: | ||
python-version: 3.8 | ||
version: "2.20.1" | ||
|
||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
name: Lock all dependencies | ||
shell: bash | ||
run: | | ||
pdm lock -G:all # create pdm.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,25 @@ defaults: | |
shell: bash | ||
|
||
jobs: | ||
lint: | ||
lock-dependencies: | ||
# The only purpose of this is to create a lockfile, which will be cached | ||
# to be used with subsequent jobs. | ||
# This provides somewhat of a middle ground and avoids having each job lock dependencies on its own, | ||
# while still not needing to commit a lockfile to the repo, which is discouraged for libraries as per | ||
# https://pdm-project.org/en/latest/usage/lockfile/ | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Instead of setup-env, we call the cache-pdm action here directly. | ||
# This avoids having to install PDM, only to find out the cache is already up to date sometimes. | ||
- name: Configure cache | ||
uses: ./.github/actions/cache-pdm | ||
with: | ||
env-already-initialized: false | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -36,9 +52,10 @@ jobs: | |
uses: pre-commit/[email protected] | ||
|
||
docs: | ||
# unlike the other workflows, we are using version 20.04 here as | ||
# readthedocs uses 20.04 for building our docs, and we want to be explicit | ||
runs-on: ubuntu-20.04 | ||
# unlike the other workflows, we explicitly use the same version as | ||
# readthedocs (see .readthedocs.yml) here for consistency | ||
runs-on: ubuntu-24.04 | ||
needs: lock-dependencies | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -52,10 +69,10 @@ jobs: | |
|
||
pyright: | ||
runs-on: ubuntu-latest | ||
needs: lock-dependencies | ||
strategy: | ||
matrix: | ||
# FIXME: using specific patch version for 3.12 due to pdm bug | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.7"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
experimental: [false] | ||
fail-fast: false | ||
continue-on-error: ${{ matrix.experimental }} | ||
|
@@ -105,6 +122,7 @@ jobs: | |
|
||
misc: | ||
runs-on: ubuntu-latest | ||
needs: lock-dependencies | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -148,9 +166,10 @@ jobs: | |
pytest: | ||
runs-on: ${{ matrix.os }} | ||
needs: lock-dependencies | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.7"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
os: ["windows-latest", "ubuntu-latest", "macos-latest"] | ||
experimental: [false] | ||
fail-fast: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ version: 2 | |
formats: | ||
- htmlzip | ||
build: | ||
os: ubuntu-20.04 | ||
os: ubuntu-24.04 | ||
tools: | ||
python: "3.8" | ||
sphinx: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Decrease the default :attr:`Guild.filesize_limit` from 25MB to 10MB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix missing/faulty :class:`Subscription`\-related gateway events. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Update internal package management tooling to latest versions, speed up CI by caching dependency metadata. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.