Skip to content

Commit ec17353

Browse files
authored
Merge pull request #3828 from bdarnell/downstream-ci-66
ci: Run the downstream testbed on a wheel built in the same run
2 parents c2e24d2 + 15f66b0 commit ec17353

3 files changed

Lines changed: 37 additions & 6 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ on:
1717
workflow_dispatch:
1818
# Allow this workflow to be run manually (pushing to testpypi instead of pypi)
1919

20-
permissions: {}
20+
permissions:
21+
contents: read
2122

2223
env:
2324
# [[[cog cog.outl(f"python-version: '3.{default_python_minor}'")]]]

‎.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]]]

‎.github/workflows/test.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ name: Test
99

1010
on: pull_request
1111

12-
permissions: {}
12+
permissions:
13+
# Read permission is redundant for the public repo, but specifying it
14+
# explicitly allows us to run CI on private copies of the repo for
15+
# embargoed security fixes.
16+
contents: read
1317

1418
jobs:
1519
# Before starting the full build matrix, run one test configuration

0 commit comments

Comments
 (0)