mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-15 21:07:20 +01:00
ci: keep the route and backstop policy reads inline (git and jq only); docs follow
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
ff14f14c63
commit
48a9d92a2f
6 files changed
+29
-11
No files matched your search
@@ -186,6 +186,7 @@ describe.skipIf(!Bun.which('jq') || !Bun.which('bash'))('the workflow steps that
|
||||
for (const { file, job, name, env } of policySteps) {
|
||||
test(`${file} ${job}: an unfetchable policy fails, a malformed one fails, an absent one routes as before`, () => {
|
||||
const script = stepOf(file, job, name).run!;
|
||||
expect(script, 'the policy read runs no repository code: git and jq only').not.toMatch(/\.github\/scripts|\bbun\b/);
|
||||
expect(script).not.toContain('|| true');
|
||||
expect(script).not.toContain('2>/dev/null');
|
||||
|
||||
|
||||
@@ -379,8 +379,6 @@ describe.skipIf(!Bun.which('jq') || !Bun.which('bash'))('the route job reads the
|
||||
fs.writeFileSync(path.join(dir, 'README.md'), 'x\n');
|
||||
git('add', '-A');
|
||||
git('commit', '-q', '-m', 'base');
|
||||
fs.mkdirSync(path.join(dir, '.github/scripts'), { recursive: true });
|
||||
fs.copyFileSync(path.join(ROOT, '.github/scripts/history-read.sh'), path.join(dir, '.github/scripts/history-read.sh'));
|
||||
return { dir, base: git('rev-parse', 'HEAD').stdout.trim() };
|
||||
}
|
||||
function run(script: string, dir: string, env: Record<string, string>): Record<string, string> {
|
||||
|
||||
Reference in new issue
Block a user