mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
* refactor(tooling): organize test runtime and maintenance owners * test(tooling): preserve relocated runtime fixture dependency edges * refactor(tooling): preserve xterm routing owner checks * ci(tooling): include routing owner in sparse checkout * test(tooling): preserve copied workflow dependency closures * fix(tooling): normalize hashed JSON assets in release parity * fix(tooling): distinguish asset aliases from literal references * fix(tooling): frame normalized asset reference payloads * fix(tooling): normalize decoded JSON asset references * refactor(tooling): organize build, CI and release owners * fix(tooling): align moved generator and workflow path contracts * fix(tooling): update generated plugin bundle owner banners * test(tooling): create relocated mobile verifier fixture directories * test(tooling): copy headless detector dependency closure * test(tooling): align native batch policy fixtures with owner path * fix(tooling): link moved reliability command to historical evidence * fix(tooling): preserve nested sandbox owners and canonical guide source * fix(tooling): target release version owners in checkout fixture
56 lines
2.0 KiB
JavaScript
56 lines
2.0 KiB
JavaScript
import { describe, expect, it, vi } from 'vitest'
|
|
import { classifyPrJobs } from './pr-code-change-scope.mjs'
|
|
import { classifyNodeServerChanges } from '../../node-server/qualification/node-server-change-scope.mjs'
|
|
import { nodeServerQualification } from '../../node-server/qualification/node-server-qualification.mjs'
|
|
|
|
const toolchainSources = [
|
|
'config/scripts/native-build/windows/initialize-windows-native-toolchain.mjs',
|
|
'config/scripts/native-build/windows/capture-windows-native-environment.cmd'
|
|
]
|
|
|
|
describe('Windows native toolchain CI routing', () => {
|
|
it.each(toolchainSources)(
|
|
'prepares native caches and packages for a change to %s alone',
|
|
(file) => {
|
|
expect(classifyPrJobs([file])).toMatchObject({
|
|
should_run: true,
|
|
native_cache_changed: true,
|
|
package: true,
|
|
package_windows: true
|
|
})
|
|
}
|
|
)
|
|
|
|
it.each(toolchainSources)(
|
|
'selects both Windows server runners for a change to %s alone',
|
|
async (file) => {
|
|
const collect = vi.fn(async () => new Set())
|
|
for (const options of [
|
|
{},
|
|
{ deferGraph: true },
|
|
{ modifiedFiles: [file] },
|
|
{ deferGraph: true, modifiedFiles: [file] }
|
|
]) {
|
|
const scope = await classifyNodeServerChanges([file], collect, options)
|
|
expect(scope).toEqual({ shouldRun: true, reason: `Build or CI input changed: ${file}` })
|
|
expect(nodeServerQualification([file], scope)).toEqual({
|
|
qualification: false,
|
|
runners: ['ubuntu-22.04', 'windows-2022', 'windows-11-arm']
|
|
})
|
|
}
|
|
expect(collect).not.toHaveBeenCalled()
|
|
}
|
|
)
|
|
|
|
it('preserves unrelated build-script routing', async () => {
|
|
const file = 'config/scripts/unrelated-toolchain.mjs'
|
|
expect(classifyPrJobs([file])).toMatchObject({
|
|
test: true,
|
|
native_cache_changed: false,
|
|
package: false,
|
|
package_windows: false
|
|
})
|
|
expect((await classifyNodeServerChanges([file], async () => new Set())).shouldRun).toBe(false)
|
|
})
|
|
})
|