mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-21 20:24:42 +00:00
use wptrunner and wpt HTTP server to run wpt tests
This commit is contained in:
88
.github/workflows/wpt.yml
vendored
88
.github/workflows/wpt.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user