Skip to content

test: enforce JSON contract parity #92

test: enforce JSON contract parity

test: enforce JSON contract parity #92

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
- uses: actions/setup-node@v4
if: matrix.python-version == '3.13'
with:
node-version: "22"
- name: Ruff
if: matrix.python-version == '3.13'
run: python -m ruff check .
- name: Type check
if: matrix.python-version == '3.13'
run: python -m mypy
- name: Test
run: python -m pytest
- name: Coverage
if: matrix.python-version == '3.13'
run: python -m pytest --cov=codex_usage_tracker --cov-report=term-missing
- name: Compile
run: python -m compileall src
- name: Dashboard JavaScript syntax
if: matrix.python-version == '3.13'
run: |
node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js
node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js
node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard.js
node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js
- name: Release readiness
run: python scripts/check_release.py
- name: Whitespace
run: git diff --check
package:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install build tooling
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
- name: Build wheel and sdist
run: python -m build
- name: Verify built wheel
run: python scripts/check_release.py --dist