From bec2915056bf54a7b1ce6ba6796557bbc462c188 Mon Sep 17 00:00:00 2001 From: nadaamd Date: Fri, 21 Aug 2026 19:32:30 +0200 Subject: [PATCH] ci: run the quant + execution test suites on every push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .github/workflows/ci.yml — two jobs, pip/npm caches, `npm ci` on the lockfile: - quant: the 21 unit tests (pytest). The 7 e2e tests are deselected via `-m "not e2e"`: they replay the real depeg dataset, which is gitignored, so letting them skip silently would make a green job meaningless. - execution: `tsc --noEmit` then the 8 unit tests (node:test). - README: CI badge under the title. Verified locally before pushing: 21 + 8 tests pass, tsc reports 0 errors. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d7f9cb2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + quant: + name: quant — CBRI model (21 tests) + runs-on: ubuntu-latest + defaults: + run: + working-directory: quant-backtest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: pip + cache-dependency-path: quant-backtest/requirements-dev.txt + - run: pip install -r requirements-dev.txt + # e2e tests are deselected: they replay the real depeg dataset, + # which is gitignored (regenerate with `python thegraph_client.py`). + - run: python -m pytest -m "not e2e" + + execution: + name: execution — Uniswap v3 breaker (8 tests) + runs-on: ubuntu-latest + defaults: + run: + working-directory: live-execution + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: npm + cache-dependency-path: live-execution/package-lock.json + - run: npm ci + - run: npx tsc --noEmit + - run: npm test diff --git a/README.md b/README.md index 75f80a3..7b0b895 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 🌒 Umbra +[![CI](https://github.com/nadaamd/umbra/actions/workflows/ci.yml/badge.svg)](https://github.com/nadaamd/umbra/actions/workflows/ci.yml) + > **The autonomous financial circuit breaker for DeFi.** > Detects systemic risk (liquidity crises, depegs) through a quantitative model, and automatically evacuates users' funds into a safe stablecoin — **before** the pool collapses.