mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
Fix CI smoke and artifact checks
This commit is contained in:
parent
6843f40742
commit
87d499ea79
6 changed files with 8 additions and 18 deletions
|
|
@ -120,7 +120,7 @@ describe('standalone local warehouse example', () => {
|
|||
]);
|
||||
expect(ingest).toMatchObject({ code: 1, stdout: '' });
|
||||
expect(ingest.stderr).toContain(
|
||||
'ktx dev ingest run requires llm.provider.backend: anthropic, vertex, or gateway, or an injected agentRunner',
|
||||
'ktx ingest run requires llm.provider.backend: anthropic, vertex, or gateway, or an injected agentRunner',
|
||||
);
|
||||
}, 30_000);
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ describe('standalone built ktx CLI smoke', () => {
|
|||
]);
|
||||
expect(run).toMatchObject({ code: 1, stdout: '' });
|
||||
expect(run.stderr).toContain(
|
||||
'ktx dev ingest run requires llm.provider.backend: anthropic, vertex, or gateway, or an injected agentRunner',
|
||||
'ktx ingest run requires llm.provider.backend: anthropic, vertex, or gateway, or an injected agentRunner',
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -151,10 +151,6 @@ export function publicNpmPackageJson(cliPackageJson, dependencies, version = PUB
|
|||
}
|
||||
|
||||
function bundledWorkspacePackageJson(packageJson) {
|
||||
const dependencies = Object.fromEntries(
|
||||
Object.entries(packageJson.dependencies ?? {}).filter(([name]) => !isWorkspacePackageName(name)),
|
||||
);
|
||||
|
||||
return {
|
||||
name: packageJson.name,
|
||||
version: packageJson.version ?? PUBLIC_NPM_PACKAGE_VERSION,
|
||||
|
|
@ -164,7 +160,6 @@ function bundledWorkspacePackageJson(packageJson) {
|
|||
types: packageJson.types,
|
||||
exports: packageJson.exports,
|
||||
files: packageJson.files,
|
||||
dependencies: sortedObject(Object.entries(dependencies)),
|
||||
license: packageJson.license ?? 'Apache-2.0',
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ describe('createPublicNpmPackageTree', () => {
|
|||
await readFile(join(layout.packRoot, 'node_modules', '@ktx', 'context', 'package.json'), 'utf8'),
|
||||
);
|
||||
assert.equal(bundledContextJson.private, true);
|
||||
assert.deepEqual(bundledContextJson.dependencies, { yaml: '^2.8.2' });
|
||||
assert.equal(bundledContextJson.dependencies, undefined);
|
||||
} finally {
|
||||
await rm(root, { recursive: true, force: true });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -459,9 +459,6 @@ export function npmSmokePackageJson(layout) {
|
|||
dependencies: {
|
||||
'@kaelio/ktx': `file:${layout.cliTarball}`,
|
||||
},
|
||||
devDependencies: {
|
||||
'better-sqlite3': '^12.6.2',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -485,11 +482,11 @@ if (typeof cli.runKtxCli !== 'function') {
|
|||
export function npmRuntimeSmokeSource() {
|
||||
return `
|
||||
import assert from 'node:assert/strict';
|
||||
import Database from 'better-sqlite3';
|
||||
import { execFile } from 'node:child_process';
|
||||
import { access, mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { DatabaseSync } from 'node:sqlite';
|
||||
import { promisify } from 'node:util';
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
|
|
@ -569,7 +566,7 @@ function getRunId(stdout) {
|
|||
}
|
||||
|
||||
async function writeSqliteWarehouse(projectDir) {
|
||||
const database = new Database(join(projectDir, 'warehouse.db'));
|
||||
const database = new DatabaseSync(join(projectDir, 'warehouse.db'));
|
||||
try {
|
||||
database.exec(\`
|
||||
DROP TABLE IF EXISTS orders;
|
||||
|
|
|
|||
|
|
@ -418,9 +418,7 @@ describe('verification snippets', () => {
|
|||
assert.deepEqual(packageJson.dependencies, {
|
||||
'@kaelio/ktx': `file:${layout.cliTarball}`,
|
||||
});
|
||||
assert.deepEqual(packageJson.devDependencies, {
|
||||
'better-sqlite3': '^12.6.2',
|
||||
});
|
||||
assert.equal(packageJson.devDependencies, undefined);
|
||||
assert.equal(
|
||||
npmSmokePnpmWorkspaceYaml(),
|
||||
['packages:', ' - "."', 'allowBuilds:', ' better-sqlite3: true', ''].join('\n'),
|
||||
|
|
@ -463,7 +461,7 @@ describe('verification snippets', () => {
|
|||
assert.match(source, /semantic-layer', 'warehouse', 'orders\.yaml'/);
|
||||
assert.match(source, /run\('pnpm', \[\s*'exec',\s*'ktx',\s*'sl',\s*'list'/);
|
||||
assert.match(source, /orders\.order_count/);
|
||||
assert.match(source, /sqlite3/);
|
||||
assert.match(source, /node:sqlite/);
|
||||
assert.match(source, /driver: sqlite/);
|
||||
assert.match(source, /path: warehouse\.db/);
|
||||
assert.match(source, /live-database/);
|
||||
|
|
@ -471,7 +469,7 @@ describe('verification snippets', () => {
|
|||
assert.match(source, /"mode": "compile_only"/);
|
||||
assert.match(source, /"mode": "executed"/);
|
||||
assert.match(source, /ktx sl query sqlite execute/);
|
||||
assert.match(source, /import Database from 'better-sqlite3'/);
|
||||
assert.match(source, /import \{ DatabaseSync \} from 'node:sqlite'/);
|
||||
assert.doesNotMatch(source, /run\('python'/);
|
||||
assert.match(source, /KTX_RUNTIME_ROOT/);
|
||||
assert.match(source, /managed-runtime/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue