diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b9b38b7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + name: Test on Node ${{ matrix.node }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node: [18, 20, 22] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + + # No dependencies to install — the engine is zero-dep. Run the smoke test, + # which validates every example, asserts self-contained output, and + # negative-tests the schema validator. + - name: Run tests + run: npm test + + # Sanity-check the CLI entry point resolves and prints help. + - name: Smoke-check the CLI + run: node bin/cli.mjs --help diff --git a/README.md b/README.md index fdef34c..63ae74c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Think-In-HTML +[![CI](https://github.com/vibhusharma101/Think-In-HTML/actions/workflows/ci.yml/badge.svg)](https://github.com/vibhusharma101/Think-In-HTML/actions/workflows/ci.yml) + Turn code, an AI thinking transcript, or any text into an explorable, interactive lesson — in one command. Think-In-HTML takes a file, a code flow, a reasoning transcript, or a block of prose and generates a **single self-contained `.html` file** that explains it like a teacher would. Open it in any browser, share it with anyone — no server, no install, no dependencies.