@@ -6,11 +6,6 @@ name: Daily WPT report
66
77on :
88 workflow_dispatch :
9- inputs :
10- node-versions :
11- description : Node.js versions (as supported by actions/setup-node) to test as JSON array
12- required : false
13- default : ' ["current", "lts/*", "lts/-1"]'
149 schedule :
1510 # This is 20 minutes after `epochs/daily` branch is triggered to be created
1611 # in WPT repo.
@@ -24,16 +19,27 @@ permissions:
2419 contents : read
2520
2621jobs :
27- report :
22+ collect-versions :
2823 if : github.repository == 'nodejs/node' || github.event_name == 'workflow_dispatch'
24+ runs-on : ubuntu-latest
25+ outputs :
26+ matrix : ${{ steps.query.outputs.matrix }}
27+ steps :
28+ - id : query
29+ run : |
30+ matrix=$(curl -s https://raw.githubusercontent.com/nodejs/Release/refs/heads/main/schedule.json | jq -c --arg now "$(date +%Y-%m-%d)" '[with_entries(select(.value.end > $now and .value.start < $now)) | keys[] | ltrimstr("v") | tonumber] + ["latest-nightly"]')
31+ echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
32+ report :
33+ needs :
34+ - collect-versions
2935 strategy :
3036 matrix :
31- node-version : ${{ fromJSON(github.event.inputs.node -versions || '["latest-nightly", "current", "lts/*", "lts/-1"]' ) }}
37+ node-version : ${{ fromJSON(needs.collect -versions.outputs.matrix ) }}
3238 fail-fast : false
3339 runs-on : ubuntu-latest
3440 steps :
3541 - name : Set up Python ${{ env.PYTHON_VERSION }}
36- uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2 .0
42+ uses : actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3 .0
3743 with :
3844 python-version : ${{ env.PYTHON_VERSION }}
3945 - name : Environment Information
4551 run : echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '[.[] | select(.files[] | contains("linux-x64"))][0].version')" >> $GITHUB_ENV
4652 - name : Install Node.js
4753 id : setup-node
48- uses : actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
54+ uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
4955 with :
5056 node-version : ${{ env.NIGHTLY || matrix.node-version }}
5157 check-latest : true
5763 SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]')
5864 echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA --jq '.sha')" >> $GITHUB_ENV
5965 - name : Checkout ${{ steps.setup-node.outputs.node-version }}
60- uses : actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
66+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6167 with :
6268 persist-credentials : false
6369 ref : ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }}
7379 run : rm -rf wpt
7480 working-directory : test/fixtures
7581 - name : Checkout epochs/daily WPT
76- uses : actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
82+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7783 with :
7884 repository : web-platform-tests/wpt
7985 persist-credentials : false
98104 run : rm -rf deps/undici
99105 - name : Checkout undici
100106 if : ${{ env.WPT_REPORT != '' }}
101- uses : actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
107+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
102108 with :
103109 repository : nodejs/undici
104110 persist-credentials : false
@@ -121,7 +127,7 @@ jobs:
121127 run : cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json
122128 - name : Upload GitHub Actions artifact
123129 if : ${{ env.WPT_REPORT != '' }}
124- uses : actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
130+ uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
125131 with :
126132 path : out/wpt/wptreport-*.json
127133 name : WPT Report for ${{ steps.setup-node.outputs.node-version }}
0 commit comments