Skip to content

fix(parse): surface :repl/exception! as structured :repl-exception fa… #89

fix(parse): surface :repl/exception! as structured :repl-exception fa…

fix(parse): surface :repl/exception! as structured :repl-exception fa… #89

Workflow file for this run

name: ci
# Runs on every push and PR. Smoke-tests the babashka shims and runs
# the runtime-test shadow-cljs build (cljs.test on node).
on:
push:
branches: [main]
pull_request:
jobs:
smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Install babashka
uses: DeLaGuardo/setup-clojure@02f5a82b79a547523e664fe8a7a32ea14884d7b2 # 13.6.0
with:
bb: "latest"
- name: ops.clj parses and dispatches
run: |
# Should emit a structured {:ok? false :reason :unknown-subcommand}
# result without needing a live nREPL. Catches load-time
# regressions (rfp-xhx: a forward-reference at line 360 broke
# every shim because bb couldn't even load ops.clj).
bb scripts/ops.clj unknown-subcommand 2>&1 | tee out.txt
grep -q ":unknown-subcommand" out.txt
- name: ops.clj unit tests
run: |
# Per-helper coverage for list-builds-on-port, read-port-
# candidates, and the load-cleanly assertion. See
# tests/ops_smoke.bb header for context.
OPS_NO_AUTO_RUN=1 bb tests/ops_smoke.bb
- name: Shell shims are executable and have valid shebangs
run: |
for f in scripts/*.sh; do
test -x "$f" || { echo "$f not executable"; exit 1; }
head -1 "$f" | grep -q '^#!/usr/bin/env bash' || { echo "$f missing bash shebang"; exit 1; }
done
- name: Plugin manifest is valid JSON
run: node -e "JSON.parse(require('fs').readFileSync('.claude-plugin/plugin.json','utf8'))"
- name: Package.json is valid JSON
run: node -e "JSON.parse(require('fs').readFileSync('package.json','utf8'))"
- name: Documented scripts all exist
run: |
for f in $(node -e "console.log(require('./.claude-plugin/plugin.json').scripts.join('\n'))"); do
test -f "$f" || { echo "Missing: $f"; exit 1; }
done
runtime-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "20"
cache: "npm"
- name: Set up JDK
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: "21"
- name: Install Clojure CLI and Babashka
uses: DeLaGuardo/setup-clojure@02f5a82b79a547523e664fe8a7a32ea14884d7b2 # 13.6.0
with:
cli: "latest"
bb: "latest"
- name: Cache deps.edn deps
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.m2/repository
~/.gitlibs
key: ${{ runner.os }}-cljs-${{ hashFiles('deps.edn', 'shadow-cljs.edn') }}
restore-keys: ${{ runner.os }}-cljs-
- name: Install npm deps
run: npm install
- name: Run runtime tests (shadow-cljs :node-test)
run: npm test