mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 16:03:47 +00:00
test(e2e): add contract test for relay artifact dispatch
Validate that the relay artifact built in CI is properly uploaded, downloaded, and passed via ORCA_RELAY_PATH to E2E test runs.
This commit is contained in:
@@ -43,4 +43,27 @@ describe('release E2E dispatch contract', () => {
|
||||
expect(buildStep.run).toContain('pnpm run build:web-from-renderer')
|
||||
expect(buildStep.run).toContain('pnpm run build:relay')
|
||||
})
|
||||
|
||||
it('hands the built relay artifact to every E2E run command', () => {
|
||||
const uploadStep = e2eWorkflow.jobs.build.steps.find(
|
||||
(step) => step.name === 'Upload E2E build output'
|
||||
)
|
||||
|
||||
expect(uploadStep.with.name).toBe('e2e-build-out')
|
||||
expect(uploadStep.with.path).toBe('out/')
|
||||
|
||||
for (const [jobName, runStepName] of [
|
||||
['e2e', 'Run E2E tests (${{ matrix.shard_name }})'],
|
||||
['changed-e2e', 'Run changed E2E specs']
|
||||
]) {
|
||||
const job = e2eWorkflow.jobs[jobName]
|
||||
const downloadStep = job.steps.find((step) => step.name === 'Download E2E build output')
|
||||
const runStep = job.steps.find((step) => step.name === runStepName)
|
||||
|
||||
expect(job.needs).toBe('build')
|
||||
expect(downloadStep.with.name).toBe('e2e-build-out')
|
||||
expect(downloadStep.with.path).toBe('out/')
|
||||
expect(runStep.run).toContain('ORCA_RELAY_PATH="$GITHUB_WORKSPACE/out/relay"')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user