1- name : CI Base
1+ name : CI
22on :
3- workflow_call :
4- inputs :
5- runner :
6- required : true
7- type : string
8- description : ' Runner to use for jobs'
9- runner_large :
10- required : false
11- type : string
12- description : ' Large runner to use for heavy jobs'
13- image_registry :
14- required : true
15- type : string
16- description : ' Container registry for images'
17- build_id :
18- required : true
19- type : string
20- description : ' Build ID for the container image'
21- use_depot :
22- required : false
23- type : boolean
24- default : false
25- description : ' Whether to use Depot for builds'
26-
3+ push :
4+ branches :
5+ - main
6+ pull_request :
7+ merge_group :
8+ types : [checks_requested]
9+ workflow_dispatch : # generally only for the "combine-prs" workflow
10+ permissions :
11+ contents : read
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
14+ cancel-in-progress : true
2715jobs :
16+ build :
17+ if : github.repository == 'pypi/warehouse'
18+ runs-on : depot-ubuntu-24.04-arm
19+ outputs :
20+ buildId : ${{ steps.build.outputs.build-id}}
21+ permissions :
22+ id-token : write
23+ steps :
24+ - name : Check out repository
25+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+ with :
27+ persist-credentials : false
28+ - name : Set up Depot CLI
29+ uses : depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # v1.6.0
30+ - name : Build image
31+ id : build
32+ uses : depot/build-push-action@9785b135c3c76c33db102e45be96a25ab55cd507 # v1.16.2
33+ with :
34+ save : true
35+ build-args : |
36+ DEVEL=yes
37+ CI=yes
38+ tags : pypi/warehouse:ci-${{ github.run_id }}
2839 test :
2940 # Time out if our test suite has gotten hung
3041 timeout-minutes : 15
42+ needs : build
3143 strategy :
3244 matrix :
3345 include :
3446 - name : Tests
3547 command : bin/tests --postgresql-host postgres
36- use_large_runner : true
48+ runs_on : depot-ubuntu-24.04-arm-4
3749 - name : Lint
3850 command : bin/lint
39- use_large_runner : true
51+ runs_on : depot-ubuntu-24.04-arm-4
4052 - name : User Documentation
4153 command : bin/user-docs
4254 - name : Developer Documentation
@@ -47,14 +59,13 @@ jobs:
4759 command : bin/licenses
4860 - name : Translations
4961 command : bin/translations
50- runs-on : ${{ (matrix.use_large_runner && inputs.runner_large != '' ) && inputs.runner_large || inputs.runner }}
62+ runs-on : ${{ (matrix.runs_on != null ) && matrix.runs_on || 'depot-ubuntu-24.04-arm' }}
5163 container :
52- image : ${{ inputs.image_registry }} :${{ inputs.build_id }}
64+ image : registry.depot.dev/rltf7cln5v :${{ needs.build.outputs.buildId }}
5365 env :
5466 BILLING_BACKEND : warehouse.subscriptions.services.MockStripeBillingService api_base=http://stripe:12111 api_version=2020-08-27
5567 permissions :
5668 id-token : write
57- packages : read
5869 services :
5970 postgres :
6071 image : ${{ (matrix.name == 'Tests') && 'postgres:17.5' || '' }}
7384 image : ${{ (matrix.name == 'Tests') && 'stripe/stripe-mock:v0.162.0' || '' }}
7485 ports :
7586 - 12111:12111
76- name : ${{ matrix.name }}${{ !inputs.use_depot && ' (GHA)' || '' }}
87+ name : ${{ matrix.name }}
7788 steps :
7889 - name : Check out repository
7990 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -90,14 +101,14 @@ jobs:
90101 run : ${{ matrix.command }}
91102
92103 check_db :
93- name : Check Database Consistency${{ !inputs.use_depot && ' (GHA)' || '' }}
94- runs-on : ${{ inputs.runner }}
104+ name : Check Database Consistency
105+ needs : build
106+ runs-on : depot-ubuntu-24.04-arm
95107 continue-on-error : true
96108 container :
97- image : ${{ inputs.image_registry }} :${{ inputs.build_id }}
109+ image : registry.depot.dev/rltf7cln5v :${{ needs.build.outputs.buildId }}
98110 permissions :
99111 id-token : write
100- packages : read
101112 services :
102113 postgres :
103114 image : postgres:17.5
@@ -128,4 +139,4 @@ jobs:
128139 run : bin/db-check
129140 env :
130141 # override the hostname set in `dev/environment`
131- DATABASE_URL : ' postgresql+psycopg://postgres@postgres/warehouse'
142+ DATABASE_URL : ' postgresql+psycopg://postgres@postgres/warehouse'
0 commit comments