Compare commits

...
Author SHA1 Message Date
Yurii Motov ff6a7c0982 Merge remote-tracking branch 'upstream/master' into optimize-workflow-cache 2026-08-26 19:54:38 +02:00
Yurii Motov da3bf33921 Bump astral-sh/setup-uv to 10.0.1 in warm-cache 2026-08-26 18:44:18 +02:00
Yurii Motov 4ebedc9a2a 👷 Give translate workflow its own uv cache suffix 2026-08-26 18:30:45 +02:00
Yurii Motov e803afcafd Revert "Add .python-version to build-docs workflow's filters"
This reverts commit ac671da87c.
2026-08-26 17:34:30 +02:00
Yurii Motov fcfe8825a9 Merge remote-tracking branch 'upstream/master' into optimize-workflow-cache 2026-08-26 17:04:59 +02:00
Yurii Motov 10375c077c Merge remote-tracking branch 'upstream/master' into optimize-workflow-cache 2026-08-10 09:23:10 +02:00
Yurii MotovandCopilot Autofix powered by AI 91444904f0 Specify --group dev explicitly in warm-cache.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-07 12:49:19 +02:00
Yurii Motov 79c30a9d8f Allow pre-commit save cache 2026-08-07 12:24:55 +02:00
Yurii Motov 472429bc75 Add path filters and if org=fastapi for warm-cache workflow 2026-08-07 11:02:22 +02:00
Yurii Motov e7b707797d Merge branch 'master' into optimize-workflow-cache 2026-08-07 08:47:45 +02:00
Yurii Motov ac671da87c Add .python-version to build-docs workflow's filters 2026-08-06 23:38:41 +02:00
Yurii Motov fbaaa005c0 Fix possible cache collision for highest and lowest uv resolutions 2026-08-06 23:25:07 +02:00
Yurii Motov 8806a3bb61 Bump uv version in workflows 2026-08-06 21:50:38 +02:00
Yurii Motov ae8a2a7cd0 Add UV_NO_SYNC: true in publish workflow 2026-08-06 21:20:52 +02:00
Yurii Motov 938d2e695f Optimize cache for GH-actions-related workflows 2026-08-06 21:20:52 +02:00
Yurii Motov 5d9a14e7be Optimize cache for 3 workflows by reading dev-all cache 2026-08-06 21:20:52 +02:00
Yurii Motov 64a1499493 Optimize cache for build-docs and deploy-docs workflows 2026-08-06 21:20:52 +02:00
Yurii Motov 546c1d0865 Optimize cache for test workflow 2026-08-06 21:20:52 +02:00
Yurii Motov a6d35b9052 Optimize cache for pre-commit workflow 2026-08-06 21:20:52 +02:00
15 changed files with 125 additions and 0 deletions

No files matched your search

+5
View File
@@ -6,6 +6,9 @@ on:
pull_request:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
changes:
runs-on: ubuntu-latest
@@ -55,6 +58,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: docs
cache-dependency-glob: |
pyproject.toml
uv.lock
@@ -92,6 +96,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: docs
cache-dependency-glob: |
pyproject.toml
uv.lock
@@ -7,6 +7,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
bump-pre-commit-hooks:
if: github.repository_owner == 'fastapi'
@@ -34,6 +37,11 @@ jobs:
cache-dependency-glob: |
pyproject.toml
uv.lock
cache-suffix: dev-all
# Disable saving cache as we install narrower set of dependencies than dev-all has.
save-cache: false
- name: Install dependencies
run: uv sync --locked --group dev
- name: Bump pre-commit hooks
run: uv run prek auto-update --freeze --cooldown-days 7
- name: Get PR Submit token
@@ -7,6 +7,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
create-draft-release:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
@@ -34,6 +37,14 @@ jobs:
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: "latest-known"
cache-dependency-glob: |
pyproject.toml
uv.lock
cache-suffix: dev-all
# Disable saving cache as we install narrower set of dependencies than dev-all has.
save-cache: false
- name: Install dependencies
run: uv sync --locked --group dev
- name: Extract release details
id: release-details
run: |
+3
View File
@@ -8,6 +8,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
deploy-docs:
runs-on: ubuntu-latest
+4
View File
@@ -7,6 +7,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
label-approved:
if: github.repository_owner == 'fastapi'
@@ -31,6 +34,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: github-actions
cache-dependency-glob: |
pyproject.toml
uv.lock
@@ -19,6 +19,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
job:
runs-on: ubuntu-latest
@@ -43,6 +46,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: github-actions
cache-dependency-glob: |
pyproject.toml
uv.lock
+2
View File
@@ -6,6 +6,7 @@ permissions: {}
env:
CAN_PUSH: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
UV_NO_SYNC: true
jobs:
pre-commit:
@@ -46,6 +47,7 @@ jobs:
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: "latest-known"
cache-suffix: dev-all
cache-dependency-glob: |
pyproject.toml
uv.lock
+11
View File
@@ -18,6 +18,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
prepare-release:
runs-on: ubuntu-latest
@@ -44,6 +47,14 @@ jobs:
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: "latest-known"
cache-dependency-glob: |
pyproject.toml
uv.lock
cache-suffix: dev-all
# Disable saving cache as we install narrower set of dependencies than dev-all has.
save-cache: false
- name: Install dependencies
run: uv sync --locked --group dev
- name: Prepare release
env:
PREPARE_RELEASE_BUMP: ${{ inputs.bump }}
+3
View File
@@ -5,6 +5,9 @@ on:
types:
- published
env:
UV_NO_SYNC: true
permissions: {}
jobs:
+4
View File
@@ -7,6 +7,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
smokeshow:
runs-on: ubuntu-latest
@@ -29,6 +32,7 @@ jobs:
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: "latest-known"
cache-suffix: github-actions
cache-dependency-glob: |
pyproject.toml
uv.lock
+4
View File
@@ -12,6 +12,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
job:
if: github.repository_owner == 'fastapi'
@@ -37,6 +40,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: github-actions
cache-dependency-glob: |
pyproject.toml
uv.lock
+10
View File
@@ -119,6 +119,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: tests-${{ matrix.uv-resolution }}
cache-dependency-glob: |
pyproject.toml
uv.lock
@@ -181,6 +182,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: tests-highest
cache-dependency-glob: |
pyproject.toml
uv.lock
@@ -249,6 +251,13 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: tests-highest
# This job checks out into `base/`, so the glob must point there.
cache-dependency-glob: |
base/pyproject.toml
base/uv.lock
# Only ever runs on pull requests, so anything it saved would be PR-scoped and useless.
save-cache: false
- name: Run the changed tests against the base code
if: steps.changed-tests.outputs.found == 'true'
working-directory: base
@@ -288,6 +297,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: tests-highest
cache-dependency-glob: |
pyproject.toml
uv.lock
+4
View File
@@ -7,6 +7,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
topic-repos:
if: github.repository_owner == 'fastapi'
@@ -32,6 +35,7 @@ jobs:
with:
version: "latest-known"
enable-cache: true
cache-suffix: github-actions
cache-dependency-glob: |
pyproject.toml
uv.lock
+5
View File
@@ -38,6 +38,9 @@ on:
permissions: {}
env:
UV_NO_SYNC: true
jobs:
langs:
runs-on: ubuntu-latest
@@ -56,6 +59,7 @@ jobs:
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: "latest-known"
cache-suffix: translations
cache-dependency-glob: |
pyproject.toml
uv.lock
@@ -98,6 +102,7 @@ jobs:
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: "latest-known"
cache-suffix: translations
cache-dependency-glob: |
pyproject.toml
uv.lock
+47
View File
@@ -0,0 +1,47 @@
name: Warm Cache
# Populates the `dev-all` uv cache at default-branch scope so that it could be used by
# `pre-commit.yml` (it has `pull_request` trigger and can't write cache available across PRs)
# and some others that use subset of dev dependencies.
on:
push:
branches:
- master
paths:
- pyproject.toml
- uv.lock
- .python-version
- .github/workflows/warm-cache.yml
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
permissions: {}
jobs:
warm-cache:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version-file: ".python-version"
- name: Setup uv
id: setup-uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: "latest-known"
enable-cache: true
cache-suffix: dev-all
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Populate the cache
if: steps.setup-uv.outputs.cache-hit != 'true'
run: uv sync --locked --group dev --extra all