feat: migrate workflows to kcl-ci standard

- Add .forgejo/kcl-ci/ with kcl.mod, main.k, Taskfile.yaml
- claude.yml: use claude.k module (fixes #comment YAML validation error,
  removes duplicate pull_request_comment trigger)
- ci.yml: add paths-ignore for kcl-ci paths, named jobs for check constants
- test-action.yml: regenerated from KCL (functionally identical)
- upstream-sync.yml: regenerated from KCL (functionally identical)
- kcl-ci-build.yml: new auto-regeneration workflow (waits for CI checks)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad MocanuandClaude Opus 4.6 committed 2026-02-27 11:40:47 +02:00
1 parent 8125818e24
commit 5c014823e0
9 files changed
+821 -383

No files matched your search

+70 -87
View File
@@ -1,118 +1,101 @@
name: CI
# Generated by KCL v1.34.3 - DO NOT EDIT
# Source: .forgejo/kcl-ci/main.k
# kcl-ci local: ~/stuff/gitrepos/wxs/actions/kcl-ci
# kcl-ci remote: https://git.wxs.ro/actions/kcl-ci
on:
name: CI
'on':
push:
branches:
- main
- main
paths-ignore:
- '.forgejo/kcl-ci/**'
pull_request:
branches:
- main
workflow_dispatch:
- main
paths-ignore:
- '.forgejo/kcl-ci/**'
workflow_dispatch: {}
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
# Pin Bun version across all jobs. Bun 1.3.x broke spyOn(fs, ...) in tests.
# Bump this when upstream tests are updated for newer Bun versions.
env:
BUN_VERSION: "1.2.21"
BUN_VERSION: '1.2.21'
jobs:
test:
name: Tests
runs-on: grunt
steps:
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
with:
fetch-depth: 1
- name: Install Bun
run: |
if command -v bun &> /dev/null; then
INSTALLED=$(bun --version)
if [ "$INSTALLED" = "$BUN_VERSION" ]; then
echo "Bun $BUN_VERSION already installed"
else
echo "Bun $INSTALLED installed, need $BUN_VERSION — reinstalling"
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
- name: Install Bun
run: |-
if command -v bun &> /dev/null; then
INSTALLED=$(bun --version)
if [ "$INSTALLED" = "$BUN_VERSION" ]; then
echo "Bun $BUN_VERSION already installed"
else
echo "Bun $INSTALLED installed, need $BUN_VERSION — reinstalling"
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run tests
# Unit tests assume GitHub context. Override Forgejo runner's
# GITHUB_SERVER_URL so module-level constants (config.ts) and
# detectPlatform() default to GitHub. Forgejo-specific tests
# explicitly set PLATFORM=forgejo in their own beforeEach.
# Inline export because Forgejo runner re-injects GITHUB_SERVER_URL
# after step-level env:, overriding it.
run: |
export GITHUB_SERVER_URL=https://github.com
bun test
else
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run tests
run: |-
export GITHUB_SERVER_URL=https://github.com
bun test
prettier:
name: Prettier
runs-on: grunt
steps:
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
with:
fetch-depth: 1
- name: Install Bun
run: |
if command -v bun &> /dev/null; then
INSTALLED=$(bun --version)
if [ "$INSTALLED" = "$BUN_VERSION" ]; then
echo "Bun $BUN_VERSION already installed"
else
echo "Bun $INSTALLED installed, need $BUN_VERSION — reinstalling"
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
- name: Install Bun
run: |-
if command -v bun &> /dev/null; then
INSTALLED=$(bun --version)
if [ "$INSTALLED" = "$BUN_VERSION" ]; then
echo "Bun $BUN_VERSION already installed"
else
echo "Bun $INSTALLED installed, need $BUN_VERSION — reinstalling"
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run prettier check
run: bun run format:check
else
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run prettier check
run: bun run format:check
typecheck:
name: Type Check
runs-on: grunt
steps:
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
with:
fetch-depth: 1
- name: Install Bun
run: |
if command -v bun &> /dev/null; then
INSTALLED=$(bun --version)
if [ "$INSTALLED" = "$BUN_VERSION" ]; then
echo "Bun $BUN_VERSION already installed"
else
echo "Bun $INSTALLED installed, need $BUN_VERSION — reinstalling"
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
- name: Install Bun
run: |-
if command -v bun &> /dev/null; then
INSTALLED=$(bun --version)
if [ "$INSTALLED" = "$BUN_VERSION" ]; then
echo "Bun $BUN_VERSION already installed"
else
echo "Bun $INSTALLED installed, need $BUN_VERSION — reinstalling"
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run TypeScript type check
run: bun run typecheck
else
curl -fsSL https://bun.sh/install | bash -s "bun-v${BUN_VERSION}"
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run TypeScript type check
run: bun run typecheck