Add extract-task-knowledge workflow #499
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| # ── fmt + lint ──────────────────────────────────────────────────────────── | |
| check: | |
| name: Format & Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '25' | |
| - name: Cache Maven + Clojure deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/repository | |
| ~/.gitlibs | |
| ~/.clojure | |
| key: clojure-${{ runner.os }}-${{ hashFiles('deps.edn', 'bb.edn') }} | |
| restore-keys: clojure-${{ runner.os }}- | |
| - name: Install Clojure & Babashka | |
| uses: DeLaGuardo/setup-clojure@13.4 | |
| with: | |
| cli: latest | |
| bb: latest | |
| - name: Install clj-kondo | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| VERSION=$(python3 - <<'PY' | |
| import json, os, sys, urllib.request | |
| fallback = '2026.03.14' | |
| url = 'https://api.github.com/repos/clj-kondo/clj-kondo/releases/latest' | |
| req = urllib.request.Request(url, headers={ | |
| 'Accept': 'application/vnd.github+json', | |
| 'Authorization': f"Bearer {os.environ.get('GITHUB_TOKEN', '')}", | |
| 'X-GitHub-Api-Version': '2022-11-28', | |
| 'User-Agent': 'psi-ci' | |
| }) | |
| try: | |
| with urllib.request.urlopen(req) as r: | |
| data = json.load(r) | |
| print(data['tag_name'].removeprefix('v')) | |
| except Exception: | |
| print(fallback) | |
| PY | |
| ) | |
| ASSET_URL="https://github.com/clj-kondo/clj-kondo/releases/download/v${VERSION}/clj-kondo-${VERSION}-linux-amd64.zip" | |
| curl -fLSs "$ASSET_URL" -o /tmp/clj-kondo.zip | |
| sudo unzip -q /tmp/clj-kondo.zip -d /usr/local/bin | |
| clj-kondo --version | |
| - name: Install cljfmt | |
| run: | | |
| VERSION=$(python3 - <<'PY' | |
| import json, urllib.request | |
| with urllib.request.urlopen('https://api.github.com/repos/weavejester/cljfmt/releases/latest') as r: | |
| print(json.load(r)['tag_name'].removeprefix('v')) | |
| PY | |
| ) | |
| curl -fsSL "https://github.com/weavejester/cljfmt/releases/download/${VERSION}/cljfmt-${VERSION}-linux-amd64.tar.gz" \ | |
| -o /tmp/cljfmt.tar.gz | |
| tar -xzf /tmp/cljfmt.tar.gz -C /tmp | |
| sudo install /tmp/cljfmt /usr/local/bin/cljfmt | |
| cljfmt --version | |
| - name: Format check | |
| run: bb fmt:check | |
| - name: Lint | |
| run: bb lint | |
| - name: Changelog check | |
| run: | | |
| msg=$(git log -1 --format=%s) | |
| if [[ "$msg" == release:* ]]; then | |
| echo "Skipping changelog check on release commit." | |
| else | |
| bb changelog:check | |
| fi | |
| # ── Clojure tests ───────────────────────────────────────────────────────── | |
| clojure-test: | |
| name: Clojure Tests | |
| runs-on: ubuntu-latest | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '25' | |
| - name: Cache Maven + Clojure deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/repository | |
| ~/.gitlibs | |
| ~/.clojure | |
| key: clojure-${{ runner.os }}-${{ hashFiles('deps.edn', 'bb.edn') }} | |
| restore-keys: clojure-${{ runner.os }}- | |
| - name: Install Clojure & Babashka | |
| uses: DeLaGuardo/setup-clojure@13.4 | |
| with: | |
| cli: latest | |
| bb: latest | |
| - name: Install tmux | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y tmux | |
| tmux -V | |
| - name: Install bbin | |
| run: | | |
| mkdir -p "$HOME/.local/bin" | |
| curl -fsSL https://raw.githubusercontent.com/babashka/bbin/v0.2.5/bbin -o "$HOME/.local/bin/bbin" | |
| chmod +x "$HOME/.local/bin/bbin" | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| "$HOME/.local/bin/bbin" version | |
| - name: Install psi launcher shim for integration tests | |
| run: | | |
| mkdir -p "$HOME/.local/bin" | |
| BB_BIN="$(command -v bb)" | |
| export BB="$BB_BIN" | |
| echo "BB=$BB_BIN" >> "$GITHUB_ENV" | |
| echo "PSI_LAUNCHER_POLICY=development" >> "$GITHUB_ENV" | |
| echo "BBIN_REPO_ROOT=$GITHUB_WORKSPACE" >> "$GITHUB_ENV" | |
| cat > "$HOME/.local/bin/psi" <<EOF | |
| #!/usr/bin/env bash | |
| export PSI_LAUNCHER_POLICY=development | |
| export BBIN_REPO_ROOT="$GITHUB_WORKSPACE" | |
| exec "$BB_BIN" bb/psi.clj -- "\$@" | |
| EOF | |
| chmod +x "$HOME/.local/bin/psi" | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| "$HOME/.local/bin/psi" --launcher-debug --help >/dev/null | |
| - name: Run Clojure tests | |
| run: bb clojure:test | |
| - name: Run Clojure integration tests | |
| run: bb clojure:test:integration | |
| # ── Smoke tests ─────────────────────────────────────────────────────────── | |
| smoke-test: | |
| name: Smoke Tests | |
| runs-on: ubuntu-latest | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '25' | |
| - name: Cache Maven + Clojure deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/repository | |
| ~/.gitlibs | |
| ~/.clojure | |
| key: clojure-${{ runner.os }}-${{ hashFiles('deps.edn', 'bb.edn') }} | |
| restore-keys: clojure-${{ runner.os }}- | |
| - name: Install Clojure & Babashka | |
| uses: DeLaGuardo/setup-clojure@13.4 | |
| with: | |
| cli: latest | |
| bb: latest | |
| - name: Install tmux | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y tmux | |
| tmux -V | |
| - name: Install bbin | |
| run: | | |
| mkdir -p "$HOME/.local/bin" | |
| curl -fsSL https://raw.githubusercontent.com/babashka/bbin/v0.2.5/bbin -o "$HOME/.local/bin/bbin" | |
| chmod +x "$HOME/.local/bin/bbin" | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| "$HOME/.local/bin/bbin" version | |
| - name: Install psi launcher shim | |
| run: | | |
| mkdir -p "$HOME/.local/bin" | |
| BB_BIN="$(command -v bb)" | |
| export BB="$BB_BIN" | |
| echo "BB=$BB_BIN" >> "$GITHUB_ENV" | |
| echo "PSI_LAUNCHER_POLICY=development" >> "$GITHUB_ENV" | |
| echo "BBIN_REPO_ROOT=$GITHUB_WORKSPACE" >> "$GITHUB_ENV" | |
| cat > "$HOME/.local/bin/psi" <<EOF | |
| #!/usr/bin/env bash | |
| export PSI_LAUNCHER_POLICY=development | |
| export BBIN_REPO_ROOT="$GITHUB_WORKSPACE" | |
| exec "$BB_BIN" bb/psi.clj -- "\$@" | |
| EOF | |
| chmod +x "$HOME/.local/bin/psi" | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| "$HOME/.local/bin/psi" --launcher-debug --help >/dev/null | |
| - name: Run smoke tests | |
| run: bb smoke:test | |
| # ── Emacs tests ─────────────────────────────────────────────────────────── | |
| emacs-test: | |
| name: Emacs Tests | |
| runs-on: ubuntu-latest | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '25' | |
| - name: Cache Maven + Clojure deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/repository | |
| ~/.gitlibs | |
| ~/.clojure | |
| key: clojure-${{ runner.os }}-${{ hashFiles('deps.edn', 'bb.edn') }} | |
| restore-keys: clojure-${{ runner.os }}- | |
| - name: Install Clojure & Babashka | |
| uses: DeLaGuardo/setup-clojure@13.4 | |
| with: | |
| cli: latest | |
| bb: latest | |
| - name: Install Emacs (latest stable) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y emacs-nox | |
| - name: Run Emacs tests | |
| run: bb emacs:check | |
| - name: Run Emacs tool details e2e | |
| run: bb emacs:tool-details:e2e |