From 0409cdae3c191c6eb23a6728002365f79dc6f71e Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Tue, 27 Oct 2026 11:20:54 -0400 Subject: [PATCH 1/4] ci: run the core and CLI tests once and cache npm downloads The Tests step rebuilt the packages and ran the core and CLI suites, then the coverage steps ran both suites again. Only the Blocks tests now run on their own; core and CLI run once, with coverage. --- .github/workflows/e2e-next-faustwp-example.yml | 1 + .github/workflows/unit-test-packages.yml | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-next-faustwp-example.yml b/.github/workflows/e2e-next-faustwp-example.yml index 706a03bbe..32823dba8 100644 --- a/.github/workflows/e2e-next-faustwp-example.yml +++ b/.github/workflows/e2e-next-faustwp-example.yml @@ -25,6 +25,7 @@ jobs: with: node-version: ${{ matrix.node }} check-latest: true + cache: npm # Copy the example from this checkout so the app is built from the # PR's own example source. - name: copy getting started example diff --git a/.github/workflows/unit-test-packages.yml b/.github/workflows/unit-test-packages.yml index 678c8a21c..a96cb9905 100644 --- a/.github/workflows/unit-test-packages.yml +++ b/.github/workflows/unit-test-packages.yml @@ -26,6 +26,7 @@ jobs: with: node-version: ${{ matrix.node }} check-latest: true + cache: npm - name: Install run: npm ci @@ -33,8 +34,9 @@ jobs: - name: Build run: npm run build - - name: Tests - run: npm run test + # Core and CLI tests run once, in the coverage steps below. + - name: Test Blocks Package + run: npm test --workspace=@faustwp/blocks - name: Code Coverage for FaustWP Core Package uses: ./.github/actions/run-coverage @@ -56,6 +58,7 @@ jobs: with: node-version: 24 check-latest: true + cache: npm - name: Install run: npm ci From c3ff46e643e6fdc0f1cd87f97f7e5444ee14cb5e Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Tue, 27 Oct 2026 11:35:53 -0400 Subject: [PATCH 2/4] ci: drop the npm cache from Test Packages and E2E Restoring the 356 MB cache added 4-6s to setup and saved 4-8s on npm ci, so it bought nothing and used repo cache space. --- .github/workflows/e2e-next-faustwp-example.yml | 1 - .github/workflows/unit-test-packages.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/e2e-next-faustwp-example.yml b/.github/workflows/e2e-next-faustwp-example.yml index 32823dba8..706a03bbe 100644 --- a/.github/workflows/e2e-next-faustwp-example.yml +++ b/.github/workflows/e2e-next-faustwp-example.yml @@ -25,7 +25,6 @@ jobs: with: node-version: ${{ matrix.node }} check-latest: true - cache: npm # Copy the example from this checkout so the app is built from the # PR's own example source. - name: copy getting started example diff --git a/.github/workflows/unit-test-packages.yml b/.github/workflows/unit-test-packages.yml index a96cb9905..371ab0eda 100644 --- a/.github/workflows/unit-test-packages.yml +++ b/.github/workflows/unit-test-packages.yml @@ -26,7 +26,6 @@ jobs: with: node-version: ${{ matrix.node }} check-latest: true - cache: npm - name: Install run: npm ci @@ -58,7 +57,6 @@ jobs: with: node-version: 24 check-latest: true - cache: npm - name: Install run: npm ci From e38bad462346d50705c9525321397dca67529473 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Tue, 27 Oct 2026 11:36:20 -0400 Subject: [PATCH 3/4] ci: remove the unused coverage report step The report action built a markdown summary that no step read and posted nothing, costing about 5s per package. Its checks and pull-requests write permissions go with it. --- .github/actions/run-coverage/action.yml | 12 ------------ .github/workflows/unit-test-packages.yml | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/actions/run-coverage/action.yml b/.github/actions/run-coverage/action.yml index 354be5be3..2406791fc 100644 --- a/.github/actions/run-coverage/action.yml +++ b/.github/actions/run-coverage/action.yml @@ -16,15 +16,3 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} run: npm run test:coverage:ci - - # Use the action only for report generation, not for running tests - - uses: ArtiomTr/jest-coverage-report-action@262a7bb0b20c4d1d6b6b026af0f008f78da72788 # v2.3.1 - with: - output: report-markdown - coverage-file: report.json - base-coverage-file: report.json - working-directory: ${{ inputs.working-directory }} - annotations: none - skip-step: all - continue-on-error: false - diff --git a/.github/workflows/unit-test-packages.yml b/.github/workflows/unit-test-packages.yml index 371ab0eda..bd9ff2ae9 100644 --- a/.github/workflows/unit-test-packages.yml +++ b/.github/workflows/unit-test-packages.yml @@ -16,8 +16,7 @@ jobs: os: ['ubuntu-22.04'] node: ['22', '24'] permissions: - checks: write - pull-requests: write + contents: read runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From 632beb8f6616faccba63fa4f19a68a844f087e39 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Tue, 27 Oct 2026 11:36:36 -0400 Subject: [PATCH 4/4] ci: name the coverage steps after the tests they run The core and CLI tests now only run in these steps, so a failing test should point at "Test Core Package" rather than "Code Coverage". --- .github/workflows/unit-test-packages.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-test-packages.yml b/.github/workflows/unit-test-packages.yml index bd9ff2ae9..39bc4915d 100644 --- a/.github/workflows/unit-test-packages.yml +++ b/.github/workflows/unit-test-packages.yml @@ -32,16 +32,15 @@ jobs: - name: Build run: npm run build - # Core and CLI tests run once, in the coverage steps below. - name: Test Blocks Package run: npm test --workspace=@faustwp/blocks - - name: Code Coverage for FaustWP Core Package + - name: Test Core Package with Coverage uses: ./.github/actions/run-coverage with: working-directory: packages/faustwp-core - - name: Code Coverage for FaustWP CLI Package + - name: Test CLI Package with Coverage uses: ./.github/actions/run-coverage with: working-directory: packages/faustwp-cli