Skip to content

Commit 4446441

Browse files
claudebdarnell
authored andcommitted
ci: Run the downstream testbed on a wheel built in the same run
The testbed installed tornado from a git URL on github.com, which a private copy of the repo (for CI on embargoed security fixes) can't provide. Build a wheel in the downstream workflow and pass it to the testbed as an artifact instead: a called workflow shares the caller's run, so it can download the wheel without access to the repo. The job now runs in any repo, since it only triggers on release branches and manual dispatch. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01TuTKdWgh56FRF7yJqaX9ug (cherry picked from commit 3a461ea)
1 parent c2e24d2 commit 4446441

1 file changed

Lines changed: 30 additions & 4 deletions

File tree

‎.github/workflows/downstream.yml‎

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,40 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17+
build:
18+
name: Build wheel
19+
runs-on: ubuntu-24.04
20+
timeout-minutes: 10
21+
permissions:
22+
contents: read
23+
steps:
24+
- uses: actions/checkout@v6
25+
with:
26+
persist-credentials: false
27+
- uses: actions/setup-python@v6
28+
with:
29+
# [[[cog cog.outl(f"python-version: '3.{default_python_minor}'")]]]
30+
python-version: '3.13'
31+
# [[[end]]]
32+
- name: Build wheel
33+
env:
34+
# Fail instead of silently building a wheel without the extension.
35+
TORNADO_EXTENSION: "1"
36+
run: python -m pip wheel --no-deps -w dist . && ls -l dist
37+
- uses: actions/upload-artifact@v7
38+
with:
39+
name: tornado-dist
40+
path: ./dist/tornado-*.whl
41+
1742
downstream:
1843
name: Downstream testbed
19-
if: github.repository == 'tornadoweb/tornado'
44+
needs: build
2045
uses: tornadoweb/tornado-testbed/.github/workflows/testbed.yml@main
2146
with:
22-
# Pin to the pushed commit, not the branch name, so a later push
23-
# can't change what this run tests.
24-
tornado_spec: git+https://github.com/tornadoweb/tornado.git@${{ github.sha }}
47+
# The testbed shares this workflow run, so it downloads the wheel
48+
# built above. That tests exactly this commit, and needs no access to
49+
# this repository (which may be private).
50+
tornado_artifact: tornado-dist
2551
# [[[cog cog.outl(f"python_version: '3.{default_python_minor}'")]]]
2652
python_version: '3.13'
2753
# [[[end]]]

0 commit comments

Comments
 (0)