From b53361b0c6c0c270b6d15f08089f8ebd8334ef27 Mon Sep 17 00:00:00 2001 From: Michael Dailey Date: Thu, 7 May 2026 16:17:47 -0500 Subject: [PATCH 1/2] PDX-0: fix(ci): add Windows Defender exclusions to reduce Windows runner lag npm install -g and NUTS subprocess spawning are ~4x slower on Windows because Defender scans every file write and every node_modules load per sf subprocess. Adding path exclusions before each step brings Windows times in line with Linux/macOS. Guards are windows-latest-only so other matrix legs are unaffected. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/CI_Execution.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/CI_Execution.yml b/.github/workflows/CI_Execution.yml index 1e146a0..7e7808e 100644 --- a/.github/workflows/CI_Execution.yml +++ b/.github/workflows/CI_Execution.yml @@ -55,6 +55,13 @@ jobs: key: ${{ runner.os }}-node-v${{ matrix.nodeversion }}-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.os }}-node-v${{ matrix.nodeversion }}- + - name: 'Exclude npm dirs from Windows Defender (CI speed)' + if: matrix.os == 'windows-latest' + shell: powershell + run: | + Add-MpPreference -ExclusionPath "$env:APPDATA\npm" + Add-MpPreference -ExclusionPath "$env:APPDATA\npm-cache" + Add-MpPreference -ExclusionPath "$env:LOCALAPPDATA\npm-cache" - name: 'sf installation' run: | npm install -g @salesforce/cli @@ -139,6 +146,13 @@ jobs: chmod 777 ./bin/run.js fi shell: bash + - name: 'Exclude workspace from Windows Defender (NUTS speed)' + if: matrix.os == 'windows-latest' + shell: powershell + run: | + Add-MpPreference -ExclusionPath "${{ github.workspace }}" + Add-MpPreference -ExclusionPath "$env:APPDATA\sf" + Add-MpPreference -ExclusionPath "$env:LOCALAPPDATA\sf" - name: Execute NUTS run: | sf plugins link . From 06e9508c3587be192919d905695c5c1e7f858933 Mon Sep 17 00:00:00 2001 From: Michael Dailey Date: Thu, 7 May 2026 16:41:18 -0500 Subject: [PATCH 2/2] PDX-0: fix(ci): switch to DisableRealtimeMonitoring + cache sf CLI on Windows --- .github/workflows/CI_Execution.yml | 32 ++++++++++++++---------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI_Execution.yml b/.github/workflows/CI_Execution.yml index 7e7808e..d6432ba 100644 --- a/.github/workflows/CI_Execution.yml +++ b/.github/workflows/CI_Execution.yml @@ -48,6 +48,10 @@ jobs: - uses: actions/setup-node@v6 with: node-version: ${{ matrix.nodeversion }} + - name: 'Disable Windows Defender real-time monitoring (CI speed)' + if: matrix.os == 'windows-latest' + shell: powershell + run: Set-MpPreference -DisableRealtimeMonitoring $true - name: 'Cache node_modules' uses: actions/cache@v5 with: @@ -55,14 +59,15 @@ jobs: key: ${{ runner.os }}-node-v${{ matrix.nodeversion }}-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.os }}-node-v${{ matrix.nodeversion }}- - - name: 'Exclude npm dirs from Windows Defender (CI speed)' + - name: 'Cache sf CLI (Windows)' if: matrix.os == 'windows-latest' - shell: powershell - run: | - Add-MpPreference -ExclusionPath "$env:APPDATA\npm" - Add-MpPreference -ExclusionPath "$env:APPDATA\npm-cache" - Add-MpPreference -ExclusionPath "$env:LOCALAPPDATA\npm-cache" + uses: actions/cache@v5 + id: cache-sf-cli + with: + path: C:\Users\runneradmin\AppData\Roaming\npm + key: sf-cli-windows-${{ hashFiles('package.json') }} - name: 'sf installation' + if: steps.cache-sf-cli.outputs.cache-hit != 'true' run: | npm install -g @salesforce/cli @@ -94,7 +99,7 @@ jobs: let branchExists = false; try { await github.rest.repos.getBranch({ - owner: 'ProvarTesting', + owner: 'ProvarTesting', repo: 'provardx-plugins-utils', branch: branch, }); @@ -141,18 +146,11 @@ jobs: - name: Change permissions run: | if [ "$RUNNER_OS" == "Linux" ]; then - chmod 777 ./bin/run.js + chmod 777 ./bin/run.js elif [ "$RUNNER_OS" == "macOS" ]; then - chmod 777 ./bin/run.js + chmod 777 ./bin/run.js fi shell: bash - - name: 'Exclude workspace from Windows Defender (NUTS speed)' - if: matrix.os == 'windows-latest' - shell: powershell - run: | - Add-MpPreference -ExclusionPath "${{ github.workspace }}" - Add-MpPreference -ExclusionPath "$env:APPDATA\sf" - Add-MpPreference -ExclusionPath "$env:LOCALAPPDATA\sf" - name: Execute NUTS run: | sf plugins link . @@ -163,4 +161,4 @@ jobs: with: name: nuts-report-${{ matrix.os }} path: mochawesome-report - if-no-files-found: warn + if-no-files-found: warn \ No newline at end of file