This repository has been archived on 2026-11-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
orderbook-collector/scripts/ci.sh
T
pascal cf6c16c9cf feat: ready to submit, a run to watch, the README, the review's fixes
Sprint 08 (roadmap/08. ready to submit.md), the last milestone.

- scripts/watch.sh runs the collector with a live view of its log, stops
  cleanly on Ctrl-C, then checks the output (reconcile) and shows one
  symbol's book as text (show, a new binary).
- The README for the solution, with the final runs: Polymarket through an
  outage it recovered from on its own, Kalshi's demo with two slow
  connections recycled.
- From a review of the whole codebase: Kalshi takes RSA keys too
  (RSA-PSS-SHA256); a slow Kalshi connection takes the hourly recycle's
  next turn, which it nearly never got before; a market tracked again no
  longer fails reconcile; Book::add checks for overflow; usage and --help
  name the key variables; the first scan says how far it got.
- Tests for every gap the reviews found, an offline run of the whole
  orchestrator among them; ShellCheck in CI.
2026-11-12 22:32:39 +01:00

21 lines
700 B
Bash
Executable File

#!/bin/sh
# The single CI entry point; run it before every commit.
# One check per line: `set -e` doesn't apply on the left of `&&` / `||`, so
# chaining would let a failing check pass silently.
set -eu
cd "$(dirname "$0")/.."
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
# The latency analysis (scripts/latency/): ruff pinned, run through uvx.
uvx ruff@0.15.0 format --check scripts/latency
uvx ruff@0.15.0 check scripts/latency
python3 -m unittest discover -s scripts/latency
# The shell scripts: ShellCheck pinned, run through uvx as ruff is.
uvx --from shellcheck-py==0.10.0.1 shellcheck scripts/*.sh
# The view of watch.sh, on a sample log.
sh scripts/test_watch.sh