ci(agent-queue): add Gitea shell-ci workflow (shellcheck + syntax + smoke)
Lints agent-queue.sh + bytelyst-cli.sh (shellcheck --severity=error), syntax-checks all scripts (bash -n) and the Node dashboard (node --check), and runs a no-agent smoke test (init/add/drain -> failed/). Gitea runner labels + node:20-bookworm container, path-filtered to the touched files.
This commit is contained in:
parent
169e944c3c
commit
9c16a631e2
66
.gitea/workflows/shell-ci.yml
Normal file
66
.gitea/workflows/shell-ci.yml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
name: Shell CI — agent-queue + CLI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- 'agent-queue/**'
|
||||||
|
- 'bytelyst-cli.sh'
|
||||||
|
- '.gitea/workflows/shell-ci.yml'
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- 'agent-queue/**'
|
||||||
|
- 'bytelyst-cli.sh'
|
||||||
|
- '.gitea/workflows/shell-ci.yml'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: shell-ci-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: shellcheck + syntax
|
||||||
|
runs-on: [ubuntu-latest, bytelyst, hostinger]
|
||||||
|
container:
|
||||||
|
image: node:20-bookworm
|
||||||
|
timeout-minutes: 10
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
github-server-url: https://gitea.bytelyst.com
|
||||||
|
|
||||||
|
- name: Install shellcheck
|
||||||
|
run: |
|
||||||
|
apt-get update -qq
|
||||||
|
apt-get install -y -qq shellcheck
|
||||||
|
shellcheck --version
|
||||||
|
|
||||||
|
- name: shellcheck (errors fail the build)
|
||||||
|
run: |
|
||||||
|
shellcheck --severity=error --shell=bash \
|
||||||
|
agent-queue/agent-queue.sh \
|
||||||
|
bytelyst-cli.sh
|
||||||
|
|
||||||
|
- name: bash syntax check
|
||||||
|
run: |
|
||||||
|
bash -n agent-queue/agent-queue.sh
|
||||||
|
bash -n bytelyst-cli.sh
|
||||||
|
|
||||||
|
- name: node syntax check (dashboard)
|
||||||
|
run: node --check agent-queue/dashboard.mjs
|
||||||
|
|
||||||
|
- name: smoke test (init + add + drain, no real agent)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
export AGENT_QUEUE_ROOT="$PWD/.ci-queue"
|
||||||
|
./agent-queue/agent-queue.sh init
|
||||||
|
# task with an invalid cwd lands in failed/ without launching any agent
|
||||||
|
printf '%s\n' '---' 'engine: devin' 'cwd: /no/such/dir' 'yolo: true' '---' '# ci' \
|
||||||
|
> /tmp/ci-task.md
|
||||||
|
./agent-queue/agent-queue.sh add /tmp/ci-task.md
|
||||||
|
./agent-queue/agent-queue.sh run --once
|
||||||
|
test -f "$AGENT_QUEUE_ROOT"/failed/*.md
|
||||||
|
echo "smoke OK: task routed to failed/ as expected"
|
||||||
|
rm -rf "$AGENT_QUEUE_ROOT"
|
||||||
Loading…
Reference in New Issue
Block a user