mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
* feat(cli): share public ingest progress adapter * feat(cli): stream plain public ingest progress * test(cli): update plain ingest progress assertions * chore(cli): satisfy plain ingest progress checks * fix(artifacts): expect plain ingest stderr progress in installed-CLI smoke * ci(coverage): make Codecov upload non-fatal and fix repo slug The Coverage job failed because the Codecov upload returned 'Repository not found' while fail_ci_if_error was true, turning a Codecov-side issue into a hard CI failure even though all tests pass. - Set fail_ci_if_error: false on both uploads so Codecov outages or an unlinked repo no longer break CI (upload stays best-effort). - Correct the stale slug Kaelio/ktx -> Kaelio/ktx-ai-data-agents-context to match the actual GitHub repo (aligns with main). * fix(cli): isolate query-history failure capture from scan output The plain public-ingest progress path passes one captured IO as the target-level `io`. With progress deps set, both the schema scan and the query-history ingest resolved their capture to that same shared buffer, so a non-actionable query-history failure surfaced leftover scan report text (e.g. "Mode: enriched") as the skipped-facet detail instead of the real query-history message. Give the query-history ingest a phase-local capture while preserving the flow-to-io branch the foreground context-build view relies on. --------- Co-authored-by: Andrey Avtomonov <7889985+andreybavt@users.noreply.github.com>
294 lines
8.8 KiB
YAML
294 lines
8.8 KiB
YAML
name: KTX CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
DO_NOT_TRACK: "1"
|
|
KTX_TELEMETRY_DISABLED: "1"
|
|
NEXT_TELEMETRY_DISABLED: "1"
|
|
|
|
concurrency:
|
|
group: ktx-ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
pre-commit-checks:
|
|
name: Pre-commit checks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "pnpm-lock.yaml"
|
|
|
|
- name: Install TypeScript dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Setup uv
|
|
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
with:
|
|
version: "0.11.11"
|
|
enable-cache: true
|
|
cache-dependency-glob: "uv.lock"
|
|
|
|
- name: Install Python dependencies
|
|
run: uv sync --all-packages --all-groups
|
|
|
|
- name: Run pre-commit hooks
|
|
run: uv run pre-commit run --all-files
|
|
|
|
typescript-checks:
|
|
name: TypeScript checks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "pnpm-lock.yaml"
|
|
|
|
- name: Install TypeScript dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run TypeScript dead-code checks
|
|
run: pnpm run dead-code
|
|
|
|
- name: Run TypeScript checks
|
|
run: pnpm run check
|
|
|
|
slow-cli-tests:
|
|
name: Slow TypeScript tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "pnpm-lock.yaml"
|
|
|
|
- name: Install TypeScript dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build TypeScript packages
|
|
run: pnpm run build
|
|
|
|
- name: Run slow CLI tests
|
|
run: pnpm --filter @kaelio/ktx run test:slow
|
|
|
|
cli-smoke-tests:
|
|
name: CLI smoke tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "pnpm-lock.yaml"
|
|
|
|
- name: Install TypeScript dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run CLI smoke tests
|
|
run: pnpm run smoke
|
|
|
|
python-checks:
|
|
name: Python checks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Setup uv
|
|
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: "uv.lock"
|
|
|
|
- name: Install Python dependencies
|
|
run: uv sync --all-packages
|
|
|
|
- name: Run Python checks
|
|
run: uv run pytest
|
|
|
|
coverage:
|
|
name: Coverage
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CODECOV_TOKEN_CONFIGURED: ${{ secrets.CODECOV_TOKEN != '' }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "pnpm-lock.yaml"
|
|
|
|
- name: Install TypeScript dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Setup uv
|
|
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
with:
|
|
version: "0.11.11"
|
|
enable-cache: true
|
|
cache-dependency-glob: "uv.lock"
|
|
|
|
- name: Install Python dependencies
|
|
run: uv sync --all-packages --all-groups
|
|
|
|
- name: Generate TypeScript coverage
|
|
run: pnpm run test:coverage:ts
|
|
|
|
- name: Upload TypeScript coverage
|
|
if: env.CODECOV_TOKEN_CONFIGURED == 'true'
|
|
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
slug: Kaelio/ktx-ai-data-agents-context
|
|
files: ./packages/cli/coverage/lcov.info
|
|
flags: typescript
|
|
name: typescript
|
|
disable_search: true
|
|
fail_ci_if_error: false
|
|
|
|
- name: Warn when Codecov token is missing for TypeScript
|
|
if: env.CODECOV_TOKEN_CONFIGURED != 'true'
|
|
run: echo "::warning::CODECOV_TOKEN is not configured; skipping TypeScript coverage upload"
|
|
|
|
- name: Generate Python coverage
|
|
run: pnpm run test:coverage:py
|
|
|
|
- name: Upload Python coverage
|
|
if: env.CODECOV_TOKEN_CONFIGURED == 'true'
|
|
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
slug: Kaelio/ktx-ai-data-agents-context
|
|
files: ./coverage/python.xml
|
|
flags: python
|
|
name: python
|
|
disable_search: true
|
|
fail_ci_if_error: false
|
|
|
|
- name: Warn when Codecov token is missing for Python
|
|
if: env.CODECOV_TOKEN_CONFIGURED != 'true'
|
|
run: echo "::warning::CODECOV_TOKEN is not configured; skipping Python coverage upload"
|
|
|
|
artifact-checks:
|
|
name: Artifact checks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "24"
|
|
cache: "pnpm"
|
|
cache-dependency-path: "pnpm-lock.yaml"
|
|
|
|
- name: Install TypeScript dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Setup uv
|
|
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: "uv.lock"
|
|
|
|
- name: Install Python dependencies
|
|
run: uv sync --all-packages
|
|
|
|
- name: Build and verify package artifacts
|
|
run: pnpm run artifacts:check
|
|
|
|
- name: Upload package artifacts
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: ktx-package-artifacts-${{ github.sha }}
|
|
path: |
|
|
dist/artifacts/manifest.json
|
|
dist/artifacts/npm/*.tgz
|
|
dist/artifacts/python/*.whl
|
|
dist/artifacts/python/*.tar.gz
|
|
if-no-files-found: error
|
|
retention-days: 7
|