From 53b537c19590bf15cd0fe8ac1a9ea4c6bdb585dc Mon Sep 17 00:00:00 2001 From: Erwann Mest Date: Sun, 5 Jul 2026 03:01:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20ci(github-actions):=20add=20CI?= =?UTF-8?q?=20workflow=20and=20fix=20test=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a GitHub Actions CI workflow that runs on push to main and on pull requests. The workflow installs dependencies via npm ci, builds the project, and runs tests on Node 22. Also updates the test script to use tsx for TypeScript test file resolution, targeting test/**/*.test.ts and test/**/*.test.tsx explicitly. --- .github/workflows/ci.yml | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) 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..67f861e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: npm + - run: npm ci + - run: npm run build + - run: npm test diff --git a/package.json b/package.json index f87139f..d0ce691 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "scripts": { "build": "tsc -p .", "dev": "tsx bin/jenkins-cli.ts", - "test": "node --test", + "test": "node --import tsx --test 'test/**/*.test.ts' 'test/**/*.test.tsx'", "prepublishOnly": "npm run build" }, "keywords": [