Personal Telegram developer console for GitHub

test: cover Cloudflare runtime credential sync

davoodmehraban89 committed Oct 4, 2026 at 23:36 UTC b7f8704505eb7950c7fdd3f1e1ac1e99a5f76392
1 file changed +11
test/cloudflare-deploy-config.test.js new
+11
@@ -0,0 +1,11 @@
1 +import test from 'node:test';
2 +import assert from 'node:assert/strict';
3 +import { readFileSync } from 'node:fs';
4 +
5 +test('production deploy syncs Cloudflare status credentials before Worker deploy', () => {
6 + const workflow = readFileSync(new URL('../.github/workflows/deploy.yml', import.meta.url), 'utf8');
7 + assert.match(workflow, /secret put CLOUDFLARE_API_TOKEN/);
8 + assert.match(workflow, /secret put CLOUDFLARE_ACCOUNT_ID/);
9 + assert.match(workflow, /Deploy verified commit to Cloudflare Workers/);
10 + assert.doesNotMatch(workflow, /echo\s+\$CLOUDFLARE_API_TOKEN/);
11 +});