From a075e95b53cbca35beed0eab6f0b9469bdc92f14 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Sun, 22 Feb 2026 00:23:11 +0800 Subject: [PATCH] Run npm tests in CI for PRs and master pushes Update the pr-tests workflow to run when test files and package manifests change, and when matching changes are pushed to master. Run npm test before lint and build so CI validates Node unit tests automatically for both pre-merge and post-merge flows. --- .github/workflows/pr-tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 604a39c2..3e04694c 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -9,6 +9,20 @@ on: paths: - "src/**" - "build.mjs" + - "tests/**" + - "package.json" + - "package-lock.json" + - ".github/workflows/pr-tests.yml" + push: + branches: + - "master" + paths: + - "src/**" + - "build.mjs" + - "tests/**" + - "package.json" + - "package-lock.json" + - ".github/workflows/pr-tests.yml" jobs: tests: @@ -20,5 +34,6 @@ jobs: with: node-version: 20 - run: npm ci + - run: npm test - run: npm run lint - run: npm run build \ No newline at end of file