Skip to content

fix: include cache-write tokens in quota audit (#577) #1678

fix: include cache-write tokens in quota audit (#577)

fix: include cache-write tokens in quota audit (#577) #1678

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
version-lockstep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check pyproject.toml and sdk-ts/package.json versions match
run: |
PY_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml | head -1)
TS_VERSION=$(jq -r '.version' sdk-ts/package.json)
echo "pyproject.toml: $PY_VERSION"
echo "sdk-ts/package.json: $TS_VERSION"
if [ "$PY_VERSION" != "$TS_VERSION" ]; then
echo "::error::Version mismatch — pyproject.toml ($PY_VERSION) and sdk-ts/package.json ($TS_VERSION) must match before cutting a release, or npm publish will fail at release time. Run: ./scripts/release.sh <version>"
exit 1
fi
- name: Check pyproject.toml and plugin manifest versions match
run: |
PY_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml | head -1)
PLUGIN_VERSION=$(jq -r '.version' plugin/.claude-plugin/plugin.json)
echo "pyproject.toml: $PY_VERSION"
echo "plugin/.claude-plugin/plugin.json: $PLUGIN_VERSION"
if [ "$PY_VERSION" != "$PLUGIN_VERSION" ]; then
echo "::error::Version mismatch — pyproject.toml ($PY_VERSION) and plugin/.claude-plugin/plugin.json ($PLUGIN_VERSION) must match before cutting a release, or the plugin marketplace entry will lag. Run: ./scripts/release.sh <version>"
exit 1
fi
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Lint
run: ruff check tokenjam/
- name: Type check
run: mypy tokenjam/
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e ".[dev,mcp]"
- name: Run tests
run: pytest -n auto tests/unit/ tests/synthetic/ tests/agents/ tests/integration/
test-ts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install and test TypeScript SDK
working-directory: sdk-ts
run: npm install && npm test