aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2025-11-09 20:40:25 +0000
committerGravatar Joe Banks <[email protected]>2025-11-09 20:52:56 +0000
commit842ffe5b728a8eea7643495d92beb647d7085400 (patch)
treec22bac9807b6fd072e8e607fcc54bee7b1e62288
parentConvert dev Dockerfile to using uv (diff)
Update CI to use uv
-rw-r--r--.github/workflows/docs.yaml26
-rw-r--r--.github/workflows/lint-test.yaml18
2 files changed, 31 insertions, 13 deletions
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index c29f0656..c606cad7 100644
--- a/.github/workflows/docs.yaml
+++ b/.github/workflows/docs.yaml
@@ -13,11 +13,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Install Python Dependencies
- uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
+ - name: Install uv
+ uses: astral-sh/setup-uv@v7
with:
- python_version: "3.11"
- install_args: "--extras async-rediscache --only main --only doc"
+ enable-cache: true
+ resolution-strategy: "lowest"
+ cache-dependency-glob: "uv.lock"
+ activate-environment: true
+
+ - name: Install dependencies
+ run: uv sync --locked --group doc --extra async-rediscache
- name: Generate HTML Site
run: sphinx-build -nW -j auto -b html docs docs/build
@@ -37,11 +42,16 @@ jobs:
with:
fetch-depth: 0 # We need to check out the entire repository to find all tags
- - name: Install Python Dependencies
- uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
+ - name: Install uv
+ uses: astral-sh/setup-uv@v7
with:
- python_version: "3.11"
- install_args: "--extras async-rediscache"
+ enable-cache: true
+ resolution-strategy: "lowest"
+ cache-dependency-glob: "uv.lock"
+ activate-environment: true
+
+ - name: Install dependencies
+ run: uv sync --locked --group doc --extra async-rediscache
- name: Build All Doc Versions
run: sphinx-multiversion docs docs/build -n -j auto
diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml
index 414bfb03..79c07797 100644
--- a/.github/workflows/lint-test.yaml
+++ b/.github/workflows/lint-test.yaml
@@ -13,11 +13,19 @@ jobs:
name: Run Linting & Test Suites
runs-on: ubuntu-latest
steps:
- - name: Install Python Dependencies
- uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
+ - uses: actions/checkout@v5
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v7
with:
- python_version: ${{ matrix.python_version }}
- install_args: "--extras async-rediscache --only main --only lint --only test"
+ enable-cache: true
+ resolution-strategy: "lowest"
+ cache-dependency-glob: "uv.lock"
+ python-version: ${{ matrix.python_version }}
+ activate-environment: true
+
+ - name: Install dependencies
+ run: uv sync --locked --group lint --group test --extra async-rediscache
- name: Run pre-commit hooks
run: SKIP=ruff pre-commit run --all-files
@@ -30,7 +38,7 @@ jobs:
run: python -m pytest -n auto --cov pydis_core -q
- name: Build and dry run the example bot to ensure deps can be installed & imported
- run: docker run --rm --env GUILD_ID=1234 --env IN_CI=true $(docker build --build-arg python_version=${{ matrix.python_version }} -q -f ./dev/Dockerfile .) run python -m dev.bot
+ run: docker run --rm --env GUILD_ID=1234 --env IN_CI=true $(docker build --build-arg python_version=${{ matrix.python_version }} -q -f ./dev/Dockerfile .)
# Prepare the Pull Request Payload artifact. If this fails, we
# we fail silently using the `continue-on-error` option. It's