Skip to content

Commit

Permalink
ci: run WPT tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jul 23, 2024
1 parent 2a4c3f5 commit 72fe053
Show file tree
Hide file tree
Showing 31 changed files with 407 additions and 373 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Install Rust 1.77.1
run: |
Expand All @@ -45,3 +43,35 @@ jobs:
- name: StarlingMonkey E2E & Integration Tests
run: |
CTEST_OUTPUT_ON_FAILURE=1 ctest --test-dir cmake-build-debug -j4
wpt:
name: Web Platform Tests
strategy:
matrix:
build: [release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Install Rust 1.77.1
run: |
rustup toolchain install 1.77.1
rustup target add wasm32-wasi --toolchain 1.77.1
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'

- name: Build StarlingMonkey WPT
run: |
cmake -S . -B cmake-build-${{ matrix.build }} -DENABLE_WPT:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build == 'release' && 'Release' || 'Debug' }}
cmake --build cmake-build-${{ matrix.build }} --parallel 4 --target wpt-runtime
env:
WPT_ROOT: ../wpt

- name: StarlingMonkey WPT Test
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest -R wpt --test-dir cmake-build-${{ matrix.build }} -j4 --verbose
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "wpt"]
path = wpt
url = [email protected]:web-platform-tests/wpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"CompressionStream constructor should throw on invalid format": {
"status": "FAIL"
"status": "PASS"
},
"deflated empty data should be reinflated back to its origin": {
"status": "PASS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"status": "PASS"
},
"format 'deflate' field ADLER should be error for 255": {
"status": "PASS"
"status": "FAIL"
},
"the unchanged input for 'gzip' should decompress successfully": {
"status": "PASS"
Expand Down Expand Up @@ -72,7 +72,7 @@
"status": "PASS"
},
"format 'gzip' field ISIZE should be error for 1": {
"status": "PASS"
"status": "FAIL"
},
"the deflate input compressed with dictionary should give an error": {
"status": "PASS"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Ensure fetch() rejects null bytes in headers": {
"status": "FAIL"
"status": "PASS"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"status": "FAIL"
},
"SHA-* integrity for opaque response": {
"status": "FAIL"
"status": "PASS"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Fetch with HEAD with body": {
"status": "FAIL"
"status": "PASS"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Non-ascii bytes in request headers": {
"status": "PASS"
"status": "FAIL"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
"status": "FAIL"
},
"Fetch with POST with ReadableStream containing String": {
"status": "FAIL"
"status": "PASS"
},
"Fetch with POST with ReadableStream containing null": {
"status": "FAIL"
"status": "PASS"
},
"Fetch with POST with ReadableStream containing number": {
"status": "FAIL"
"status": "PASS"
},
"Fetch with POST with ReadableStream containing ArrayBuffer": {
"status": "FAIL"
"status": "PASS"
},
"Fetch with POST with ReadableStream containing Blob": {
"status": "FAIL"
"status": "PASS"
},
"Fetch with POST with text body on 421 response should be retried once on new connection.": {
"status": "FAIL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"status": "PASS"
},
"Streaming upload with body containing a String": {
"status": "FAIL"
"status": "PASS"
},
"Streaming upload with body containing null": {
"status": "FAIL"
"status": "PASS"
},
"Streaming upload with body containing a number": {
"status": "FAIL"
"status": "PASS"
},
"Streaming upload should fail on a 401 response": {
"status": "FAIL"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"fetch() with value %00": {
"status": "FAIL"
"status": "PASS"
},
"fetch() with value %01": {
"status": "FAIL"
Expand Down Expand Up @@ -30,10 +30,10 @@
"status": "PASS"
},
"fetch() with value %0A": {
"status": "FAIL"
"status": "PASS"
},
"fetch() with value %0D": {
"status": "FAIL"
"status": "PASS"
},
"fetch() with value %0E": {
"status": "FAIL"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"fetch() with value x%00x needs to throw": {
"status": "FAIL"
"status": "PASS"
},
"fetch() with value x%0Ax needs to throw": {
"status": "FAIL"
"status": "PASS"
},
"fetch() with value x%0Dx needs to throw": {
"status": "FAIL"
"status": "PASS"
},
"fetch() with all valid values": {
"status": "FAIL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"status": "PASS"
},
"Create headers with 1 should throw": {
"status": "FAIL"
"status": "PASS"
},
"Create headers with sequence": {
"status": "PASS"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
{
"Create headers giving an array having one string as init argument": {
"status": "FAIL"
"status": "PASS"
},
"Create headers giving an array having three strings as init argument": {
"status": "FAIL"
"status": "PASS"
},
"Create headers giving bad header name as init argument": {
"status": "FAIL"
"status": "PASS"
},
"Create headers giving bad header value as init argument": {
"status": "FAIL"
},
"Check headers get with an invalid name invalidĀ": {
"status": "FAIL"
"status": "PASS"
},
"Check headers get with an invalid name [object Object]": {
"status": "FAIL"
"status": "PASS"
},
"Check headers delete with an invalid name invalidĀ": {
"status": "FAIL"
"status": "PASS"
},
"Check headers delete with an invalid name [object Object]": {
"status": "FAIL"
"status": "PASS"
},
"Check headers has with an invalid name invalidĀ": {
"status": "FAIL"
"status": "PASS"
},
"Check headers has with an invalid name [object Object]": {
"status": "FAIL"
"status": "PASS"
},
"Check headers set with an invalid name invalidĀ": {
"status": "FAIL"
"status": "PASS"
},
"Check headers set with an invalid name [object Object]": {
"status": "FAIL"
"status": "PASS"
},
"Check headers set with an invalid value invalidĀ": {
"status": "FAIL"
},
"Check headers append with an invalid name invalidĀ": {
"status": "FAIL"
"status": "PASS"
},
"Check headers append with an invalid name [object Object]": {
"status": "FAIL"
"status": "PASS"
},
"Check headers append with an invalid value invalidĀ": {
"status": "FAIL"
},
"Headers forEach throws if argument is not callable": {
"status": "FAIL"
"status": "PASS"
},
"Headers forEach loop should stop if callback is throwing exception": {
"status": "PASS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"status": "FAIL"
},
"Input URL is not valid": {
"status": "FAIL"
"status": "PASS"
},
"Input URL has credentials": {
"status": "FAIL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
"status": "PASS"
},
"Constructing a Request with a stream on which getReader() is called": {
"status": "FAIL"
"status": "PASS"
},
"Constructing a Request with a stream on which read() is called": {
"status": "FAIL"
"status": "PASS"
},
"Constructing a Request with a stream on which read() and releaseLock() are called": {
"status": "FAIL"
"status": "PASS"
},
"Constructing a Request with a Request on which body.getReader() is called": {
"status": "FAIL"
"status": "PASS"
},
"Constructing a Request with a Request on which body.getReader().read() is called": {
"status": "FAIL"
"status": "PASS"
},
"Constructing a Request with a Request on which read() and releaseLock() are called": {
"status": "FAIL"
"status": "PASS"
},
"It is OK to omit .duplex when the body is null.": {
"status": "PASS"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Request has clone method": {
"status": "PASS"
"status": "FAIL"
},
"Request has arrayBuffer method": {
"status": "PASS"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"Throws RangeError when responseInit's status is 0": {
"status": "FAIL"
"status": "PASS"
},
"Throws RangeError when responseInit's status is 100": {
"status": "FAIL"
"status": "PASS"
},
"Throws RangeError when responseInit's status is 199": {
"status": "FAIL"
"status": "PASS"
},
"Throws RangeError when responseInit's status is 600": {
"status": "FAIL"
"status": "PASS"
},
"Throws RangeError when responseInit's status is 1000": {
"status": "FAIL"
"status": "PASS"
},
"Throws TypeError when responseInit's statusText is \n": {
"status": "FAIL"
Expand All @@ -21,12 +21,12 @@
"status": "FAIL"
},
"Throws TypeError when building a response with body and a body status of 204": {
"status": "FAIL"
"status": "PASS"
},
"Throws TypeError when building a response with body and a body status of 205": {
"status": "FAIL"
"status": "PASS"
},
"Throws TypeError when building a response with body and a body status of 304": {
"status": "FAIL"
"status": "PASS"
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Constructing a Response with a stream on which getReader() is called": {
"status": "FAIL"
"status": "PASS"
},
"Constructing a Response with a stream on which read() is called": {
"status": "FAIL"
"status": "PASS"
},
"Constructing a Response with a stream on which read() and releaseLock() are called": {
"status": "FAIL"
"status": "PASS"
}
}
Loading

0 comments on commit 72fe053

Please sign in to comment.