Skip to content

Commit 4ace6e7

Browse files
committed
Update CI to use uv
1 parent a4f5f31 commit 4ace6e7

File tree

2 files changed

+31
-13
lines changed

2 files changed

+31
-13
lines changed

.github/workflows/docs.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: Install Python Dependencies
17-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v7
1818
with:
19-
python_version: "3.11"
20-
install_args: "--extras async-rediscache --only main --only doc"
19+
enable-cache: true
20+
resolution-strategy: "lowest"
21+
cache-dependency-glob: "uv.lock"
22+
activate-environment: true
23+
24+
- name: Install dependencies
25+
run: uv sync --locked --group doc --extra async-rediscache
2126

2227
- name: Generate HTML Site
2328
run: sphinx-build -nW -j auto -b html docs docs/build
@@ -37,11 +42,16 @@ jobs:
3742
with:
3843
fetch-depth: 0 # We need to check out the entire repository to find all tags
3944

40-
- name: Install Python Dependencies
41-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
45+
- name: Install uv
46+
uses: astral-sh/setup-uv@v7
4247
with:
43-
python_version: "3.11"
44-
install_args: "--extras async-rediscache"
48+
enable-cache: true
49+
resolution-strategy: "lowest"
50+
cache-dependency-glob: "uv.lock"
51+
activate-environment: true
52+
53+
- name: Install dependencies
54+
run: uv sync --locked --group doc --extra async-rediscache
4555

4656
- name: Build All Doc Versions
4757
run: sphinx-multiversion docs docs/build -n -j auto

.github/workflows/lint-test.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,19 @@ jobs:
1313
name: Run Linting & Test Suites
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Install Python Dependencies
17-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
16+
- uses: actions/checkout@v5
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v7
1820
with:
19-
python_version: ${{ matrix.python_version }}
20-
install_args: "--extras async-rediscache --only main --only lint --only test"
21+
enable-cache: true
22+
resolution-strategy: "lowest"
23+
cache-dependency-glob: "uv.lock"
24+
python-version: ${{ matrix.python_version }}
25+
activate-environment: true
26+
27+
- name: Install dependencies
28+
run: uv sync --locked --group lint --group test --extra async-rediscache
2129

2230
- name: Run pre-commit hooks
2331
run: SKIP=ruff pre-commit run --all-files
@@ -30,7 +38,7 @@ jobs:
3038
run: python -m pytest -n auto --cov pydis_core -q
3139

3240
- name: Build and dry run the example bot to ensure deps can be installed & imported
33-
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
41+
run: docker run --rm --env --tty GUILD_ID=1234 --env IN_CI=true $(docker build --build-arg python_version=${{ matrix.python_version }} -q -f ./dev/Dockerfile .) python -m bot
3442

3543
# Prepare the Pull Request Payload artifact. If this fails, we
3644
# we fail silently using the `continue-on-error` option. It's

0 commit comments

Comments
 (0)