mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-01 00:50:00 +08:00
test(ecc2): normalize release workflow newlines
This commit is contained in:
parent
c7c7d37f29
commit
2eaafc38f6
@ -21,6 +21,7 @@ const ciWorkflowPath = path.join(__dirname, '..', '..', '.github', 'workflows',
|
|||||||
const releaseWorkflowSource = fs.readFileSync(releaseWorkflowPath, 'utf8');
|
const releaseWorkflowSource = fs.readFileSync(releaseWorkflowPath, 'utf8');
|
||||||
const reusableReleaseWorkflowSource = fs.readFileSync(reusableReleaseWorkflowPath, 'utf8');
|
const reusableReleaseWorkflowSource = fs.readFileSync(reusableReleaseWorkflowPath, 'utf8');
|
||||||
const ciWorkflowSource = fs.readFileSync(ciWorkflowPath, 'utf8');
|
const ciWorkflowSource = fs.readFileSync(ciWorkflowPath, 'utf8');
|
||||||
|
const normalizedCiWorkflowSource = ciWorkflowSource.replace(/\r\n/g, '\n');
|
||||||
|
|
||||||
function test(name, fn) {
|
function test(name, fn) {
|
||||||
try {
|
try {
|
||||||
@ -126,7 +127,7 @@ function runTests() {
|
|||||||
})) passed++; else failed++;
|
})) passed++; else failed++;
|
||||||
|
|
||||||
if (test('CI runs for release branches and version tags before release workflows execute', () => {
|
if (test('CI runs for release branches and version tags before release workflows execute', () => {
|
||||||
const pushBlockMatch = ciWorkflowSource.match(/on:\n\s+push:\n([\s\S]*?)\n\s+pull_request:/);
|
const pushBlockMatch = normalizedCiWorkflowSource.match(/on:\n\s+push:\n([\s\S]*?)\n\s+pull_request:/);
|
||||||
const pushBlock = pushBlockMatch ? pushBlockMatch[1] : '';
|
const pushBlock = pushBlockMatch ? pushBlockMatch[1] : '';
|
||||||
|
|
||||||
assert.ok(pushBlock, 'ci.yml should define a push trigger block');
|
assert.ok(pushBlock, 'ci.yml should define a push trigger block');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user