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