From 8dd7f634dd524d8170d165189063ee91cbf5da80 Mon Sep 17 00:00:00 2001 From: Tal Ayash Date: Tue, 20 Oct 2026 11:00:03 +0300 Subject: [PATCH] Run tests in CI Run npm test on every push to main and every pull request, on Node 18, 20 and 22 (Linux) plus Node 22 on Windows. Add a status badge to the README. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..304e232 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + name: Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + node: [18, 20, 22] + include: + # render.mjs has Windows-specific path and browser handling + - os: windows-latest + node: 22 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: npm + - run: npm ci + - run: npm test diff --git a/README.md b/README.md index bbcfe7b..13993c7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # learn +[![Test](https://github.com/talayash/learn/actions/workflows/test.yml/badge.svg)](https://github.com/talayash/learn/actions/workflows/test.yml) + **Type `/learn` after you build something, and get a visual lesson about what you just did.** A Claude Code plugin. It reads your session and your git diff, then opens a page in your browser that explains your work: the architecture, how a request moves through it, the design patterns you used (with links to the exact lines), your database and cache choices, the words you should know, and a short quiz.