use wptrunner and wpt HTTP server to run wpt tests

This commit is contained in:
Pierre Tachoire
2026-02-24 12:06:37 +01:00
parent 24b6934d3b
commit 25c941b847

View File

@@ -15,11 +15,11 @@ on:
workflow_dispatch:
jobs:
wpt:
name: web platform tests json output
wpt-build-release:
name: zig build release
runs-on: ubuntu-latest
timeout-minutes: 90
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
@@ -30,11 +30,85 @@ jobs:
- uses: ./.github/actions/install
- name: build wpt
run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast -- version
- name: zig build release
run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: lightpanda-build-release
path: |
zig-out/bin/lightpanda
retention-days: 1
wpt-build-runner:
name: build wpt runner
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v6
with:
repository: 'lightpanda-io/demo'
fetch-depth: 0
- run: |
cd ./wptrunner
CGO_ENABLED=0 go build
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: wptrunner
path: |
wptrunner/wptrunner
retention-days: 1
run-wpt:
name: web platform tests json output
needs:
- wpt-build-release
- wpt-build-runner
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v6
with:
ref: fork
repository: 'lightpanda-io/wpt'
fetch-depth: 0
- name: create custom hosts
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
- name: generate manifest
run: ./wpt manifest
- name: download lightpanda release
uses: actions/download-artifact@v4
with:
name: lightpanda-build-release
- run: chmod a+x ./lightpanda
- name: download wptrunner
uses: actions/download-artifact@v4
with:
name: wptrunner
- run: chmod a+x ./wptrunner
- name: run test with json output
run: zig-out/bin/lightpanda-wpt --json > wpt.json
run: |
./wpt serve & echo $! > WPT.pid
sleep 10s
./lightpanda serve & echo $! > LPD.pid
sleep 1s
./wptrunner -json -concurrency 2 > wpt.json
kill `cat WPT.pid` `cat LPD.pid`
- name: write commit
run: |
@@ -51,7 +125,7 @@ jobs:
perf-fmt:
name: perf-fmt
needs: wpt
needs: run-wpt
runs-on: ubuntu-latest
timeout-minutes: 15