test: require exact ceremony workflow pins
This commit is contained in:
parent
52e8d45b78
commit
3fac8096f7
1 changed files with 6 additions and 6 deletions
|
|
@ -13,10 +13,7 @@ const REPOSITORY_MIRROR = path.join(__dirname, '..', '.ceremony');
|
|||
const ROOT_AGENTS = path.join(__dirname, '..', 'AGENTS.md');
|
||||
const CEREMONY_REPOSITORY = 'https://forgejo.heavyduty.builders/heavy-duty/ceremony';
|
||||
const CEREMONY_VERSION = '0.6.3';
|
||||
const CEREMONY_WORKFLOWS = [
|
||||
path.join(__dirname, '..', '.forgejo', 'workflows', 'labels.yml'),
|
||||
path.join(__dirname, '..', '.forgejo', 'workflows', 'labels-sweep.yml'),
|
||||
];
|
||||
const CEREMONY_WORKFLOWS = ['labels.yml', 'labels-sweep.yml'];
|
||||
const cleanups = [];
|
||||
process.on('exit', () => {
|
||||
for (const dir of cleanups) fs.rmSync(dir, { recursive: true, force: true });
|
||||
|
|
@ -148,8 +145,11 @@ test('repository carries the complete Forgejo 0.6.3 doctrine mirror and root rou
|
|||
'mirror README does not identify the exact Forgejo ceremony source and version',
|
||||
);
|
||||
for (const workflow of CEREMONY_WORKFLOWS) {
|
||||
const contents = fs.readFileSync(workflow, 'utf8');
|
||||
assert.match(contents, new RegExp(`uses: heavy-duty/ceremony/.github/workflows/[^@]+@${CEREMONY_VERSION}`));
|
||||
const contents = fs.readFileSync(path.join(__dirname, '..', '.forgejo', 'workflows', workflow), 'utf8');
|
||||
assert.ok(
|
||||
contents.includes(`uses: heavy-duty/ceremony/.github/workflows/${workflow}@${CEREMONY_VERSION}`),
|
||||
`${workflow} does not pin ceremony ${CEREMONY_VERSION}`,
|
||||
);
|
||||
}
|
||||
assert.match(mirrorReadme, /labels doctrine is vendored manually/);
|
||||
assert.doesNotMatch(mirrorReadme, /The pin lives in `.github\/workflows\/release\.yml`/);
|
||||
|
|
|
|||
Loading…
Reference in a new issue