MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / buildSteps

Function buildSteps

scripts/pre-push-check.js:101–138  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

99}
100
101function buildSteps(mode) {
102 const steps = [
103 {
104 name: 'pre-commit 检查',
105 args: ['run', 'precommit:check']
106 }
107 ];
108
109 if (mode === 'fast') {
110 const relatedFiles = getRelatedFiles();
111 if (relatedFiles.length > 0) {
112 steps.push({
113 name: `相关测试检查(${relatedFiles.length} 个文件)`,
114 args: [
115 'test',
116 '--',
117 '--bail',
118 '--findRelatedTests',
119 '--passWithNoTests',
120 ...relatedFiles
121 ]
122 });
123 } else {
124 steps.push({
125 name: '测试检查(未识别差异文件,回退全量测试)',
126 args: ['test', '--', '--bail']
127 });
128 }
129 return steps;
130 }
131
132 steps.push({
133 name: '全量测试检查',
134 args: ['test', '--', '--bail']
135 });
136
137 return steps;
138}
139
140function runStep(step) {
141 console.log(`\n🔎 执行 ${step.name}...`);

Callers 1

mainFunction · 0.85

Calls 1

getRelatedFilesFunction · 0.85

Tested by

no test coverage detected