tools: re-enable undici WPTs in daily wpt.fyi job · nodejs/node@a932fbd
@@ -95,6 +95,48 @@ jobs:
9595 echo "WPT_REPORT=$(pwd)/out/wpt/wptreport.json" >> $GITHUB_ENV
9696 fi
979798+ # undici WPT Runner
99+ - name: Set env.UNDICI_VERSION
100+if: ${{ env.WPT_REPORT != '' }}
101+run: |
102+ UNDICI_VERSION=$(jq -r '.version' < deps/undici/src/package.json)
103+ echo "UNDICI_VERSION=v$UNDICI_VERSION" >> $GITHUB_ENV
104+ if [ "${UNDICI_VERSION%%.*}" -ge 7 ]; then
105+ echo "UNDICI_WPT=current" >> $GITHUB_ENV
106+ else
107+ echo "UNDICI_WPT=legacy" >> $GITHUB_ENV
108+ fi
109+ # Checkout composite actions from the default branch since the
110+# version-specific checkout above overwrites .github/actions/
111+ - name: Checkout undici WPT actions
112+if: ${{ env.WPT_REPORT != '' }}
113+uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
114+with:
115+sparse-checkout: |
116+ .github/actions/undici-wpt-current
117+ .github/actions/undici-wpt-legacy
118+ sparse-checkout-cone-mode: false
119+persist-credentials: false
120+path: _wpt_actions
121+clean: false
122+ - name: Place undici WPT actions
123+if: ${{ env.WPT_REPORT != '' }}
124+run: |
125+ mkdir -p .github/actions
126+ cp -r _wpt_actions/.github/actions/undici-wpt-* .github/actions/
127+ - name: Run undici WPT (current)
128+if: ${{ env.UNDICI_WPT == 'current' }}
129+uses: ./.github/actions/undici-wpt-current
130+with:
131+undici-version: ${{ env.UNDICI_VERSION }}
132+wpt-report: ${{ env.WPT_REPORT }}
133+ - name: Run undici WPT (legacy)
134+if: ${{ env.UNDICI_WPT == 'legacy' }}
135+uses: ./.github/actions/undici-wpt-legacy
136+with:
137+undici-version: ${{ env.UNDICI_VERSION }}
138+wpt-report: ${{ env.WPT_REPORT }}
139+98140# Upload artifacts
99141 - name: Clone report for upload
100142if: ${{ env.WPT_REPORT != '' }}