-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathaction.yml
More file actions
56 lines (54 loc) · 1.75 KB
/
Copy pathaction.yml
File metadata and controls
56 lines (54 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Run undici WPT (current)
description: Runs undici WPT tests for undici >= 7 and merges results into the Node.js WPT report
inputs:
undici-version:
required: true
description: undici version tag to checkout
wpt-report:
required: true
description: Path to the Node.js WPT report to merge into
runs:
using: composite
steps:
- name: Checkout undici
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: nodejs/undici
persist-credentials: false
path: undici
clean: false
ref: ${{ inputs.undici-version }}
- name: Prepare WPT checkout
shell: bash
run: |
rm -rf undici/test/web-platform-tests/wpt
mv test/fixtures/wpt undici/test/web-platform-tests/wpt
- name: Configure hosts
shell: bash
working-directory: undici/test/web-platform-tests/wpt
run: python3 wpt make-hosts-file | sudo tee -a /etc/hosts
- name: Install dependencies
shell: bash
working-directory: undici
run: npm install
- name: Run WPT
shell: bash
working-directory: undici
env:
CI: 'true'
WPT_REPORT: ${{ github.workspace }}/undici/wptreport.json
run: npm run test:wpt || true
- name: Merge report
shell: bash
env:
NODE_WPT_REPORT: ${{ inputs.wpt-report }}
UNDICI_WPT_REPORT: ${{ github.workspace }}/undici/wptreport.json
run: |
if [ -f "$UNDICI_WPT_REPORT" ]; then
jq -sc '
.[0].results += .[1].results |
.[0].time_end = .[1].time_end |
.[0]
' "$NODE_WPT_REPORT" "$UNDICI_WPT_REPORT" > "${NODE_WPT_REPORT}.tmp"
mv "${NODE_WPT_REPORT}.tmp" "$NODE_WPT_REPORT"
fi