From a2029cb178adab3f04841a668be0a77ad459e631 Mon Sep 17 00:00:00 2001 From: John Crenshaw Date: Sat, 29 Aug 2026 22:36:43 -0400 Subject: [PATCH] ci: add cross-version test coverage --- .github/dependabot.yml | 10 +++++++++ .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++ README.md | 3 +++ 3 files changed, 59 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6c5049e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + github-actions: + patterns: + - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2e66860 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Tests (Python ${{ matrix.python-version }}) + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + python-version: + - "3.8" + - "3.14" + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Check Python syntax + run: | + python -m py_compile burnrate.py tools/mkfixture.py tools/selftest.py + python -m json.tool .claude-plugin/marketplace.json >/dev/null + python -m json.tool .claude-plugin/plugin.json >/dev/null + + - name: Check shell syntax + run: bash -n .githooks/pre-push extras/install_usage_logger.sh extras/usage_logger.sh + + - name: Run self-test + run: python tools/selftest.py diff --git a/README.md b/README.md index ea976af..055dd28 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # burnrate +[![CI](https://github.com/crenshawdev/burnrate/actions/workflows/ci.yml/badge.svg)](https://github.com/crenshawdev/burnrate/actions/workflows/ci.yml) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) + A single-file, on-demand dashboard of your own Claude Code token usage. Run it and one self-contained `dashboard.html` opens in your browser: daily burn