From 1a4dc59535b398f3ac58b5ea489b2548bae97d50 Mon Sep 17 00:00:00 2001 From: margaretjgu Date: Mon, 20 Oct 2025 11:03:26 -0400 Subject: [PATCH 1/3] update workflow for md changes only --- .github/workflows/nodejs.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 0a6781200..b8c98db8a 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -121,3 +121,16 @@ jobs: - name: ECMAScript module test run: | bun run test:esm + + test-summary: + name: Test (summary) + runs-on: ubuntu-latest + needs: [paths-filter, test, test-bun] + if: always() + steps: + - run: exit 1 + if: | + needs.test.result == 'failure' || + needs.test-bun.result == 'failure' || + needs.test.result == 'cancelled' || + needs.test-bun.result == 'cancelled' From 3753047af600d72c5db4b521d637fa434e2c1e57 Mon Sep 17 00:00:00 2001 From: margaretjgu Date: Mon, 20 Oct 2025 14:08:13 -0400 Subject: [PATCH 2/3] update workflow for md changes only --- .github/workflows/nodejs.yml | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b8c98db8a..43d4c77e3 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -26,8 +26,6 @@ jobs: name: Test runs-on: ${{ matrix.os }} needs: paths-filter - # only run if code relevant to unit tests was changed - if: needs.paths-filter.outputs.src-only == 'true' strategy: fail-fast: false @@ -50,14 +48,17 @@ jobs: npm install - name: Lint + if: needs.paths-filter.outputs.src-only == 'true' run: | npm run lint - name: Unit test + if: needs.paths-filter.outputs.src-only == 'true' run: | npm run test:unit - name: ECMAScript module test + if: needs.paths-filter.outputs.src-only == 'true' run: | npm run test:esm @@ -90,8 +91,6 @@ jobs: name: Test Bun runs-on: ${{ matrix.os }} needs: paths-filter - # only run if code relevant to unit tests was changed - if: needs.paths-filter.outputs.src-only == 'true' strategy: fail-fast: false @@ -111,26 +110,16 @@ jobs: bun install - name: Lint + if: needs.paths-filter.outputs.src-only == 'true' run: | bun run lint - name: Unit test + if: needs.paths-filter.outputs.src-only == 'true' run: | bun run test:unit-bun - name: ECMAScript module test + if: needs.paths-filter.outputs.src-only == 'true' run: | bun run test:esm - - test-summary: - name: Test (summary) - runs-on: ubuntu-latest - needs: [paths-filter, test, test-bun] - if: always() - steps: - - run: exit 1 - if: | - needs.test.result == 'failure' || - needs.test-bun.result == 'failure' || - needs.test.result == 'cancelled' || - needs.test-bun.result == 'cancelled' From e2dcd8b620773fef498112597694334b105b80fa Mon Sep 17 00:00:00 2001 From: margaretjgu Date: Tue, 21 Oct 2025 11:20:08 -0400 Subject: [PATCH 3/3] update workflow for md changes only --- .github/workflows/nodejs.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 43d4c77e3..b4379fcba 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -26,6 +26,8 @@ jobs: name: Test runs-on: ${{ matrix.os }} needs: paths-filter + env: + CODE_CHANGED: ${{ needs.paths-filter.outputs.src-only }} strategy: fail-fast: false @@ -48,19 +50,16 @@ jobs: npm install - name: Lint - if: needs.paths-filter.outputs.src-only == 'true' run: | - npm run lint + [ "$CODE_CHANGED" = "true" ] && npm run lint || exit 0 - name: Unit test - if: needs.paths-filter.outputs.src-only == 'true' run: | - npm run test:unit + [ "$CODE_CHANGED" = "true" ] && npm run test:unit || exit 0 - name: ECMAScript module test - if: needs.paths-filter.outputs.src-only == 'true' run: | - npm run test:esm + [ "$CODE_CHANGED" = "true" ] && npm run test:esm || exit 0 license: name: License check @@ -91,6 +90,8 @@ jobs: name: Test Bun runs-on: ${{ matrix.os }} needs: paths-filter + env: + CODE_CHANGED: ${{ needs.paths-filter.outputs.src-only }} strategy: fail-fast: false @@ -110,16 +111,13 @@ jobs: bun install - name: Lint - if: needs.paths-filter.outputs.src-only == 'true' run: | - bun run lint + [ "$CODE_CHANGED" = "true" ] && bun run lint || exit 0 - name: Unit test - if: needs.paths-filter.outputs.src-only == 'true' run: | - bun run test:unit-bun + [ "$CODE_CHANGED" = "true" ] && bun run test:unit-bun || exit 0 - name: ECMAScript module test - if: needs.paths-filter.outputs.src-only == 'true' run: | - bun run test:esm + [ "$CODE_CHANGED" = "true" ] && bun run test:esm || exit 0