From 8909264b839bbb29182aea362065869fc52562c0 Mon Sep 17 00:00:00 2001 From: Imron Reviady Date: Sat, 3 Oct 2026 13:30:28 +0700 Subject: [PATCH 1/2] CI: run the test suite and checks on every pull request Adds .github/workflows/ci.yml running the test suite and the type checker or analyzer on every pull request and push to main. --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..945660b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + name: Test (Node ${{ matrix.node }}) + runs-on: ubuntu-latest + strategy: + matrix: + node: ["18", "22"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: npm + - run: npm ci + - name: Type-check + run: npm run lint + - name: Test + run: npm test From 931c7cc335f6325bdc6a743cca53ddd1ae969c96 Mon Sep 17 00:00:00 2001 From: Imron Reviady Date: Sat, 3 Oct 2026 13:37:16 +0700 Subject: [PATCH 2/2] Run tests through a shell glob node --test with a quoted glob relies on Node expanding it, which Node 18 and 22 do not; the shell expands it on every version. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7d107f2..97b06e1 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build": "tsc", "dev": "tsc --watch", "lint": "tsc --noEmit", - "test": "tsc && node --test \"test/*.test.js\"", + "test": "tsc && node --test test/*.test.js", "prepare": "tsc" }, "keywords": [