Skip to content

designer: two PR #450 panel rules (open-question form; symbol-name ci… #38

designer: two PR #450 panel rules (open-question form; symbol-name ci…

designer: two PR #450 panel rules (open-question form; symbol-name ci… #38

Workflow file for this run

---
name: driver-tests
on:
push:
branches:
- design/driver
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
driver-tests:
name: driver-tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install shellcheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
shellcheck --version
- name: Configure local git identity
# The driver tests build a mock journal that runs `git init` and
# commits. GitHub Actions runners do not have a default identity.
run: |
git config --global user.name "ci-bot"
git config --global user.email "ci-bot@example.invalid"
- name: shellcheck (driver + daemons + watcher stub + cleaner + checks + per-test scripts)
# Lint the in-PR bash artifacts. Scope is the driver, the daemon
# management wrappers, the stub feed watcher, the cleaner
# skeleton, the gardener-inbox error reporter, the pre-dispatch
# grep-gate runner and gates, and the driver / checks test
# harnesses. Pre-existing scripts outside this scope have
# known issues unrelated to this PR; widening the lint surface
# is a separate effort.
run: |
shellcheck -S warning \
scripts/driver/driver.sh \
scripts/daemons/start.sh \
scripts/daemons/stop.sh \
scripts/daemons/status.sh \
scripts/daemons/logs.sh \
scripts/daemons/config.sh.example \
scripts/watcher/endo-but-for-bots/watcher.sh \
scripts/checks/run-all.sh \
scripts/checks/bench-engines-rename/check.sh \
scripts/checks/double-space-sentence-separator/check.sh \
skills/cleaner/cleaner.sh \
skills/cleaner/test-cleaner.sh \
skills/gardener-inbox-error-reporting/report-error.sh \
tests/driver/run.sh \
tests/driver/lib/mock-garden.sh \
tests/driver/test_skeleton.sh \
tests/driver/test_design_only_happy_path.sh \
tests/driver/test_loop_capture_and_self_improve.sh \
tests/driver/test_trap_fires_on_error.sh \
tests/checks/run.sh \
tests/checks/test_bench_engines_rename.sh \
tests/checks/test_double_space_sentence_separator.sh \
tests/checks/test_run_all.sh
- name: bash -n (syntax check, all scripts/ and skill main scripts)
# Syntactic check on every shell script under scripts/ and skills/.
# `bash -n` is purely lexical so it is safe to run on the broader
# set, unlike shellcheck which surfaces warnings the surrounding
# scripts have not addressed yet.
run: |
set -eu
fail=0
while IFS= read -r f; do
if ! bash -n "$f"; then
echo "::error file=$f::bash -n failed"
fail=1
fi
done < <(find scripts skills -mindepth 2 -maxdepth 4 -type f -name '*.sh' | sort)
if [ "$fail" -ne 0 ]; then
exit 1
fi
- name: Run driver script tests
run: bash tests/driver/run.sh
- name: Run pre-dispatch grep-gate tests
run: bash tests/checks/run.sh
- name: Run cleaner skeleton self-test
run: bash skills/cleaner/test-cleaner.sh