mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
Remove stale app service references
This commit is contained in:
parent
e18e6ac8c4
commit
9530d33c00
10 changed files with 30 additions and 59 deletions
|
|
@ -14,7 +14,7 @@ function lowerProductName() {
|
|||
describe('scanFileContent', () => {
|
||||
it('rejects source imports from application directories', () => {
|
||||
const serverAlias = '@' + 'server/contracts';
|
||||
const pythonAppPath = 'python-service/' + 'app/api/endpoints/semantic_layer.py';
|
||||
const pythonAppPath = `${['python', 'service'].join('-')}/app/api/endpoints/semantic_layer.py`;
|
||||
|
||||
const violations = [
|
||||
...scanFileContent('packages/context/src/index.ts', `import { orpc } from '${serverAlias}';`),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { dirname, resolve } from 'node:path';
|
|||
import { fileURLToPath } from 'node:url';
|
||||
import { describe, it } from 'node:test';
|
||||
|
||||
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..');
|
||||
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const ciWorkflowPath = resolve(repoRoot, '.github', 'workflows', 'ci.yml');
|
||||
|
||||
async function readCiWorkflowOrSkip(testContext) {
|
||||
|
|
@ -21,7 +21,7 @@ async function readCiWorkflowOrSkip(testContext) {
|
|||
}
|
||||
|
||||
describe('KTX CI artifact upload contract', () => {
|
||||
it('uploads verified KTX package artifacts from check-ktx-subtree', async (testContext) => {
|
||||
it('uploads verified KTX package artifacts from the standalone check job', async (testContext) => {
|
||||
const workflow = await readCiWorkflowOrSkip(testContext);
|
||||
if (workflow === null) {
|
||||
return;
|
||||
|
|
@ -29,42 +29,35 @@ describe('KTX CI artifact upload contract', () => {
|
|||
|
||||
assert.match(
|
||||
workflow,
|
||||
/name: Build ktx package artifacts and verify public smoke\s+run: cd ktx && pnpm run artifacts:build && pnpm run artifacts:verify-manifest && pnpm run artifacts:verify-demo\s+- name: Upload ktx package artifacts/s,
|
||||
/name: Build and verify package artifacts\s+run: pnpm run artifacts:check\s+- name: Upload package artifacts/s,
|
||||
);
|
||||
assert.match(workflow, /uses: actions\/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f/);
|
||||
assert.match(workflow, /name: ktx-package-artifacts-\$\{\{ github\.sha \}\}/);
|
||||
assert.match(workflow, /ktx\/dist\/artifacts\/manifest\.json/);
|
||||
assert.match(workflow, /ktx\/dist\/artifacts\/npm\/\*\.tgz/);
|
||||
assert.match(workflow, /ktx\/dist\/artifacts\/python\/\*\.whl/);
|
||||
assert.match(workflow, /ktx\/dist\/artifacts\/python\/\*\.tar\.gz/);
|
||||
assert.match(workflow, /dist\/artifacts\/manifest\.json/);
|
||||
assert.match(workflow, /dist\/artifacts\/npm\/\*\.tgz/);
|
||||
assert.match(workflow, /dist\/artifacts\/python\/\*\.whl/);
|
||||
assert.match(workflow, /dist\/artifacts\/python\/\*\.tar\.gz/);
|
||||
assert.match(workflow, /if-no-files-found: error/);
|
||||
assert.match(workflow, /retention-days: 7/);
|
||||
});
|
||||
|
||||
it('runs packed demo artifact smoke on Linux and macOS', async (testContext) => {
|
||||
it('runs TypeScript and Python checks in the standalone workflow', async (testContext) => {
|
||||
const workflow = await readCiWorkflowOrSkip(testContext);
|
||||
if (workflow === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert.match(workflow, /check-ktx-packed-demo:/);
|
||||
assert.match(workflow, /matrix:\s+os: \[ubuntu-latest, macos-latest\]/s);
|
||||
assert.match(workflow, /name: Download ktx package artifacts/);
|
||||
assert.match(workflow, /path: ktx\/dist\/artifacts/);
|
||||
assert.match(workflow, /run: cd ktx && pnpm run artifacts:verify-demo/);
|
||||
assert.match(workflow, /run: pnpm run check/);
|
||||
assert.match(workflow, /run: uv sync --all-packages/);
|
||||
assert.match(workflow, /run: uv run pytest/);
|
||||
});
|
||||
|
||||
it('includes packed demo artifact smoke in ci-success', async (testContext) => {
|
||||
it('does not depend on host application CI jobs', async (testContext) => {
|
||||
const workflow = await readCiWorkflowOrSkip(testContext);
|
||||
if (workflow === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert.match(
|
||||
workflow,
|
||||
/needs: \[check-ktx-subtree, check-ktx-packed-demo, build-python-service, test-server, build-frontend, run-pre-commit, build-docker-images\]/,
|
||||
);
|
||||
assert.match(workflow, /needs\.check-ktx-packed-demo\.result.*== "failure"/);
|
||||
assert.match(workflow, /needs\.check-ktx-packed-demo\.result.*== "cancelled"/);
|
||||
assert.doesNotMatch(workflow, /build-python-service|test-server|build-frontend|build-docker-images/);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -31,11 +31,10 @@ describe('Conductor workspace scripts', () => {
|
|||
|
||||
it('runs the KTX daemon on the documented fixed local port', async () => {
|
||||
const runScript = await readText('scripts/conductor-run.sh');
|
||||
const legacyServerPackagePattern = new RegExp(`@${['kae', 'lio'].join('')}/server|python-service|npx`);
|
||||
|
||||
assert.match(runScript, /pnpm run build/);
|
||||
assert.match(runScript, /source \.venv\/bin\/activate/);
|
||||
assert.match(runScript, /uv run ktx-daemon serve-http --host 127\.0\.0\.1 --port 8765/);
|
||||
assert.doesNotMatch(runScript, legacyServerPackagePattern);
|
||||
assert.doesNotMatch(runScript, /\bnpx\b/);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ describe('standalone example docs', () => {
|
|||
assert.match(smoke, /assert_manifest "\$FIRST_MANIFEST" true/);
|
||||
assert.match(smoke, /assert_manifest "\$SECOND_MANIFEST" false/);
|
||||
assert.match(smoke, /assert_manifest "\$RESET_MANIFEST" true/);
|
||||
assert.doesNotMatch(readme, /python-service/);
|
||||
assert.doesNotMatch(smoke, /python-service|PYTHON_SERVICE|REPO_ROOT/);
|
||||
});
|
||||
|
||||
it('lists every published TypeScript package in the package root README', async () => {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ function commandKeys(files) {
|
|||
|
||||
describe('precommit-check', () => {
|
||||
it('skips files outside ktx', () => {
|
||||
assert.deepEqual(commandKeys(['server/src/app.ts']), []);
|
||||
assert.deepEqual(commandKeys(['outside-workspace/src/app.ts']), []);
|
||||
});
|
||||
|
||||
it('runs only the touched package checks for package code', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue