@@ -131,11 +131,64 @@ jobs:
131131 if-no-files-found : error
132132 retention-days : 1
133133
134+ build-greenlight-lambda :
135+ name : Build greenlight lambda
136+ runs-on : ubuntu-latest
137+ # greenlight builds on its own mise/uv/just toolchain (cp313) rather than the
138+ # `make deployment.zip` convention, so it gets its own job. Non-blocking for the
139+ # same reason as the advisor-coverage leg: a greenlight build failure must not
140+ # block publishing the shared lambda release (pytorch-auto-revert et al.). A
141+ # failed continue-on-error job reports success to `release`'s `needs`, and simply
142+ # omits its zip.
143+ continue-on-error : true
144+ permissions :
145+ contents : read
146+ steps :
147+ - name : Checkout code
148+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
149+ with :
150+ ref : ${{ inputs.tag }}
151+
152+ - uses : jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1
153+ with :
154+ working_directory : greenlight
155+
156+ - name : Sync dependencies
157+ working-directory : greenlight
158+ run : just setup
159+
160+ - name : Package lambda zip
161+ working-directory : greenlight
162+ run : just package
163+
164+ - name : Smoke-test the built zip imports on Python 3.13
165+ # -S drops site-packages so imports resolve only from the extracted zip, not the
166+ # project .venv that mise puts on sys.path; the test exercises the artifact itself.
167+ working-directory : greenlight
168+ run : |
169+ set -euo pipefail
170+ smoke_dir="$(mktemp -d)"
171+ unzip -q dist/greenlight-scan.zip -d "${smoke_dir}"
172+ PYTHONPATH="${smoke_dir}" mise exec -- python -S -c \
173+ "import greenlight.lambda_handler, greenlight.cli, boto3, github, clickhouse_connect, yaml"
174+
175+ - name : Copy greenlight-scan.zip to root
176+ run : cp greenlight/dist/greenlight-scan.zip greenlight-scan.zip
177+
178+ - name : Stage greenlight-scan zip
179+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
180+ with :
181+ name : lambda-greenlight-scan
182+ path : greenlight-scan.zip
183+ if-no-files-found : error
184+ retention-days : 1
185+
134186 release :
135187 name : Publish release
136188 needs :
137189 - build-runner-lambdas
138190 - build-python-lambdas
191+ - build-greenlight-lambda
139192 runs-on : ubuntu-latest
140193 permissions :
141194 contents : write
0 commit comments