|
89 | 89 | input_source_repo: ${{ steps.resolve-inputs.outputs.source_repo }} |
90 | 90 | input_source_pr_number: ${{ steps.resolve-inputs.outputs.source_pr_number }} |
91 | 91 | input_source_pr_url: ${{ steps.resolve-inputs.outputs.source_pr_url }} |
92 | | - # Node versions to test, read from the wizard's own CI matrix at the ref |
93 | | - # under test — the workbench tracks whatever the wizard supports, no drift. |
94 | | - node_versions: ${{ steps.node-matrix.outputs.node_versions }} |
95 | | - build_node: ${{ steps.node-matrix.outputs.build_node }} |
96 | 92 |
|
97 | 93 | steps: |
98 | 94 | - name: Resolve inputs |
@@ -205,31 +201,6 @@ jobs: |
205 | 201 | echo " source_pr_number: $SOURCE_PR_NUMBER" |
206 | 202 | echo " source_pr_url: $SOURCE_PR_URL" |
207 | 203 |
|
208 | | - - name: Resolve wizard Node matrix |
209 | | - id: node-matrix |
210 | | - env: |
211 | | - WIZARD_REF: ${{ steps.resolve-inputs.outputs.wizard_ref }} |
212 | | - run: | |
213 | | - # Test the wizard on exactly the Node versions its own CI matrix |
214 | | - # declares, at the ref under test — so this stays in lockstep with the |
215 | | - # wizard (add a version there and it is covered here) with no drift. |
216 | | - # PostHog/wizard is public; resolve the ref to a SHA first so branch |
217 | | - # names with slashes still fetch. Fall back to a sane default on any |
218 | | - # miss so a bad read never empties the matrix. |
219 | | - FALLBACK='["22.22.0", 24]' |
220 | | - SHA=$(git ls-remote "https://github.com/PostHog/wizard.git" "$WIZARD_REF" 2>/dev/null | head -1 | cut -f1) |
221 | | - [ -z "$SHA" ] && SHA="$WIZARD_REF" |
222 | | - RAW=$(curl -fsSL "https://raw.githubusercontent.com/PostHog/wizard/${SHA}/.github/workflows/build.yml" 2>/dev/null || true) |
223 | | - NODES=$(printf '%s' "$RAW" | grep -oE "node: \[[^]]*\]" | head -1 | sed -E "s/^node: //; s/'/\"/g") |
224 | | - if ! printf '%s' "$NODES" | jq -e 'type == "array" and length > 0' >/dev/null 2>&1; then |
225 | | - echo "Could not read wizard Node matrix (got: '${NODES}'); using fallback." |
226 | | - NODES="$FALLBACK" |
227 | | - fi |
228 | | - BUILD_NODE=$(printf '%s' "$NODES" | jq -r '.[-1]') |
229 | | - echo "node_versions=$NODES" >> "$GITHUB_OUTPUT" |
230 | | - echo "build_node=$BUILD_NODE" >> "$GITHUB_OUTPUT" |
231 | | - echo "Wizard Node matrix @ ${WIZARD_REF} (${SHA}): $NODES (build on $BUILD_NODE)" |
232 | | -
|
233 | 204 | - name: Generate trigger ID |
234 | 205 | id: generate-id |
235 | 206 | env: |
@@ -492,9 +463,7 @@ jobs: |
492 | 463 | - name: Setup Node.js |
493 | 464 | uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
494 | 465 | with: |
495 | | - # Build the dep cache once on the newest supported Node; the cache key |
496 | | - # is Node-agnostic (wizard SHA) and the built wizard is portable JS. |
497 | | - node-version: ${{ needs.discover.outputs.build_node }} |
| 466 | + node-version: '24' |
498 | 467 |
|
499 | 468 | - name: Setup pnpm |
500 | 469 | uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 |
@@ -524,7 +493,6 @@ jobs: |
524 | 493 | max-parallel: 10 |
525 | 494 | matrix: |
526 | 495 | app: ${{ fromJson(needs.discover.outputs.apps) }} |
527 | | - node: ${{ fromJson(needs.discover.outputs.node_versions) }} |
528 | 496 | outputs: |
529 | 497 | pr_url: ${{ steps.process-results.outputs.pr_url }} |
530 | 498 | pr_number: ${{ steps.process-results.outputs.pr_number }} |
@@ -558,7 +526,7 @@ jobs: |
558 | 526 | - name: Setup Node.js |
559 | 527 | uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
560 | 528 | with: |
561 | | - node-version: ${{ matrix.node }} |
| 529 | + node-version: '24' |
562 | 530 |
|
563 | 531 | - name: Setup pnpm |
564 | 532 | uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 |
|
0 commit comments