File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 uses : actions/setup-node@v4
1818 with :
1919 node-version : " 22"
20+ cache : " npm"
21+ - name : Cache node_modules
22+ id : cache
23+ uses : actions/cache@v4
24+ with :
25+ path : node_modules
26+ key : npm-22-${{ hashFiles('package-lock.json') }}
27+ restore-keys : |
28+ npm-22-
2029 - name : Install Dependencies
30+ if : steps.cache.outputs.cache-hit != 'true'
2131 run : npm ci
2232 - name : Run Linter
2333 run : npm run lint
5565 uses : actions/setup-node@v4
5666 with :
5767 node-version : ${{ matrix.node-version }}
68+ cache : " npm"
69+ - name : Cache node_modules
70+ id : cache
71+ uses : actions/cache@v4
72+ with :
73+ path : node_modules
74+ key : npm-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
75+ restore-keys : |
76+ npm-${{ matrix.node-version }}-
5877 - name : Install Dependencies
78+ if : steps.cache.outputs.cache-hit != 'true'
5979 run : npm ci
80+ - name : Stagger integration start (reduce auth/server thundering)
81+ if : ${{ matrix.test == 'integration:v5:batch' }}
82+ run : |
83+ # Spread 15 integration jobs over ~30s so token endpoint isn't hammered
84+ case "${{ matrix.node-version }}" in 20) n=0;; 22) n=1;; 24) n=2;; *) n=0;; esac
85+ delay=$(( ${{ matrix.batch-index }} * 6 + n * 2 ))
86+ echo "Staggering ${delay}s before running tests (batch ${{ matrix.batch-index }}, node ${{ matrix.node-version }})"
87+ sleep "$delay"
6088 - name : Run ${{ matrix.test }} Tests and Add Annotations
6189 id : tests
6290 run : |
You can’t perform that action at this time.
0 commit comments