perf(ci): run selected tests once before service builds
This commit is contained in:
@@ -13,6 +13,17 @@ test('coordinator releases its builder while waiting for downstream jobs', () =>
|
||||
assert.doesNotMatch(pipeline, /cleanWs\(/)
|
||||
})
|
||||
|
||||
test('coordinator runs selected tests once before parallel service packaging', () => {
|
||||
const gateIndex = pipeline.indexOf("stage('统一 Maven 测试门禁')")
|
||||
const dispatchIndex = pipeline.indexOf("stage('并行调度独立服务 Job')")
|
||||
|
||||
assert.ok(gateIndex >= 0, 'unified test gate must exist')
|
||||
assert.ok(dispatchIndex > gateIndex, 'unified tests must finish before downstream dispatch')
|
||||
assert.match(pipeline, /-pl \$\{selectedModules\} -am test/)
|
||||
assert.match(pipeline, /booleanParam\(name: 'SKIP_TESTS', value: true\)/)
|
||||
assert.doesNotMatch(pipeline, /TESTED_COMMIT/)
|
||||
})
|
||||
|
||||
test('AUTO detects database migrations without expanding them to all services', () => {
|
||||
assert.match(pipeline, /def databaseMigrationPaths = \['deploy\/sql\/'\]/)
|
||||
assert.match(pipeline, /!databaseMigration && commonPaths\.any/)
|
||||
|
||||
Reference in New Issue
Block a user