-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathopenwork-workflows.test.mjs
More file actions
39 lines (35 loc) · 998 Bytes
/
Copy pathopenwork-workflows.test.mjs
File metadata and controls
39 lines (35 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import assert from 'node:assert/strict';
import { readdirSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { describe, it } from 'node:test';
import { fileURLToPath } from 'node:url';
const workflowsDir = join(
dirname(fileURLToPath(import.meta.url)),
'..',
'workflows',
);
const reviewedWorkflows = [
'audio-capture-prebuilds.yml',
'ci.yml',
'codeql.yml',
'desktop-build.yml',
'desktop-release.yml',
'docs-page-action.yml',
'e2e.yml',
'main-ci-failure-issue.yml',
'npm-cache.yml',
'repo-hygiene.yml',
'sdk-java.yml',
'sdk-python.yml',
'stale.yml',
'web-shell-visuals-cleanup.yml',
'windows-runner-smoke.yml',
];
describe('OpenWork workflow boundary', () => {
it('requires every checked-in workflow to be explicitly reviewed', () => {
const workflows = readdirSync(workflowsDir)
.filter((name) => name.endsWith('.yml') || name.endsWith('.yaml'))
.sort();
assert.deepEqual(workflows, reviewedWorkflows);
});
});