mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
The GitHub repo was renamed back from Kaelio/ktx-ai-data-agents-context to Kaelio/ktx, reverting the URL changes from #250 across package metadata, CI (codecov + star-history slugs), issue/security templates, the release runbook, and docs/install commands. Also removes the rename-resilience machinery #250 added: semantic-release now reads the repository URL straight from package.json (Kaelio/ktx) again, so the repositoryUrl() derivation in scripts/semantic-release-config.cjs, its tests, and the rename note in docs/release.md are no longer needed.
294 lines
8.7 KiB
YAML
294 lines
8.7 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
|
|
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
|
|
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
|