@@ -4,6 +4,7 @@ import { isDeepStrictEqual } from 'node:util';
44const files = {
55 live : new URL ( '../wrangler.production.live.jsonc' , import . meta. url ) ,
66 darkLaunch : new URL ( '../wrangler.production.dark-launch.jsonc' , import . meta. url ) ,
7+ deployWorkflow : new URL ( '../.github/workflows/deploy-production.yml' , import . meta. url ) ,
78} ;
89
910let assertions = 0 ;
@@ -179,6 +180,7 @@ function normalizeModeDifferences(config) {
179180
180181const live = await readConfig ( files . live , 'live config' ) ;
181182const darkLaunch = await readConfig ( files . darkLaunch , 'dark-launch config' ) ;
183+ const deployWorkflow = await readFile ( files . deployWorkflow , 'utf8' ) ;
182184
183185validateConfig ( live , {
184186 label : 'live config' ,
@@ -200,4 +202,21 @@ assertDeepEqual(
200202 'live and dark-launch configs differ outside the reviewed mode surface' ,
201203) ;
202204
205+ assert (
206+ deployWorkflow . includes ( 'ORBIT_LIVE_OAUTH_CLIENT_ID: ${{ secrets.ORBIT_LIVE_OAUTH_CLIENT_ID }}' ) ,
207+ 'production deploy does not source the live OAuth client ID from the production environment' ,
208+ ) ;
209+ assert (
210+ deployWorkflow . includes ( 'ORBIT_LIVE_OAUTH_CLIENT_SECRET: ${{ secrets.ORBIT_LIVE_OAUTH_CLIENT_SECRET }}' ) ,
211+ 'production deploy does not source the live OAuth client secret from the production environment' ,
212+ ) ;
213+ assert (
214+ deployWorkflow . includes ( '--secrets-file "$oauth_secrets_file"' ) ,
215+ 'production deploy does not upload the live OAuth pair with the Worker version' ,
216+ ) ;
217+ assert (
218+ deployWorkflow . includes ( "trap 'rm -f \"$oauth_secrets_file\"' EXIT" ) ,
219+ 'production deploy does not clean up its temporary OAuth secrets file' ,
220+ ) ;
221+
203222process . stdout . write ( `Orbit production config tests: ${ assertions } assertions passed\n` ) ;
0 commit comments