From 08e4d17983b8072ffbc0007ea93e50cc11640c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= Date: Tue, 10 Mar 2026 22:30:38 +0100 Subject: [PATCH] chore(node): add lint/test/check scripts and node tools CI Co-Authored-By: Claude Opus 4.6 --- .github/workflows/node-tools-ci.yml | 33 +++++++++++++++++++++++++++++ package.json | 3 +++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/node-tools-ci.yml diff --git a/.github/workflows/node-tools-ci.yml b/.github/workflows/node-tools-ci.yml new file mode 100644 index 00000000..9728a8b3 --- /dev/null +++ b/.github/workflows/node-tools-ci.yml @@ -0,0 +1,33 @@ +name: Node Tools CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +concurrency: + group: wled-node-tools-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + node-tools: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Quality gate + run: npm run check diff --git a/package.json b/package.json index 8171059d..93aca1db 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ }, "scripts": { "build": "node tools/cdata.js", + "lint": "node --check tools/cdata.js", + "test": "npm run build", + "check": "npm run lint && npm run test", "dev": "nodemon -e js,html,htm,css,png,jpg,gif,ico,js -w tools/ -w wled00/data/ -x node tools/cdata.js" }, "repository": {