Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run web platform tests in browsers #132

Merged
merged 31 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
362e506
Move WPT script to test/wpt-node
MattiasBuelens Sep 17, 2021
bf4422d
Copy server setup from wpt-runner
MattiasBuelens Sep 17, 2021
aea3c21
Fix paths
MattiasBuelens Sep 17, 2021
27f1301
Move exclusions to separate file
MattiasBuelens Sep 27, 2021
f073d42
Run WPT in a browser
MattiasBuelens Sep 27, 2021
dc84d10
Tweak CLI argument handling
MattiasBuelens Sep 27, 2021
bf7b557
Tweak
MattiasBuelens Sep 27, 2021
e87fd4e
Speed up by only sending used properties
MattiasBuelens Sep 27, 2021
6052f05
Use wpt-runner's version of testharness.js
MattiasBuelens Sep 27, 2021
b3cd2f0
Use own overrides over static file server
MattiasBuelens Sep 27, 2021
2c2ad08
Fix indentation
MattiasBuelens Sep 27, 2021
bab4a4f
Remove unused URLs
MattiasBuelens Sep 27, 2021
5c1ace2
Re-use browser instance for all test runs
MattiasBuelens Sep 28, 2021
559da45
Re-use server across test runs
MattiasBuelens Sep 28, 2021
c0aeb53
Allow running in Chromium and Firefox
MattiasBuelens Sep 28, 2021
771202d
Checkout submodules at start of CI jobs
MattiasBuelens Sep 28, 2021
490e053
Rework test scripts
MattiasBuelens Sep 28, 2021
3e4db35
Run browser tests on CI
MattiasBuelens Sep 28, 2021
b7ab0d7
Use actions/setup-node@v3
MattiasBuelens Sep 28, 2021
3677d0f
Cache npm dependencies
MattiasBuelens Sep 28, 2021
149e854
Simplify
MattiasBuelens Sep 28, 2021
15bb372
Fix typos
MattiasBuelens Sep 28, 2021
9e90928
Install only a single browser
MattiasBuelens Sep 28, 2021
06efa29
Use npm ci
MattiasBuelens Sep 28, 2021
ab49e19
Only run Node 20 tests on merge commits of pull requests
MattiasBuelens Sep 28, 2021
343c642
Rename workflows and jobs
MattiasBuelens Sep 28, 2021
1ea4424
Tweak
MattiasBuelens Sep 29, 2021
bbed38f
Fix PR jobs not running when they should
MattiasBuelens Sep 29, 2021
6384843
Use on.<event>.types
MattiasBuelens Sep 29, 2021
703bf52
Use container for Playwright tests
MattiasBuelens Jan 3, 2024
5976bf6
Fix missing optional dependencies
MattiasBuelens Jan 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
name: Build pull request
on: [pull_request]
name: Test pull request
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs:
build:
test-node:
name: Node
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
# Run only on non-merged non-draft mergeable pull requests
if: |
!(
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize')
&& !github.event.pull_request.draft
(
!github.event.pull_request.draft
&& !github.event.pull_request.merged
&& github.event.pull_request.merge_commit_sha != null
)
steps:
- name: Check out merge commit of pull request
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
submodules: true
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
run: |
npm install
npm test
node-version: 20
cache: npm
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npm run test:types
- run: npm run test:unit
- run: npm run test:wpt:node
50 changes: 41 additions & 9 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,54 @@
name: Build on push
name: Test on push
on: [push]
jobs:
build:
test-node:
name: Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [18, 20]
# Skip job if commit message contains "[skip ci]"
if: |
!contains(github.event.head_commit.message, '[skip ci]')
steps:
- name: Check out commit
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
run: |
npm install
npm test
cache: npm
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npm run test:types
- run: npm run test:unit
- run: npm run test:wpt:node

test-browser:
name: ${{ matrix.browser }}
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.40.0-jammy
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox]
if: |
!contains(github.event.head_commit.message, '[skip ci]')
steps:
- name: Check out commit
uses: actions/checkout@v3
with:
submodules: true
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run test:wpt:${{ matrix.browser }}
env:
HOME: /root
Loading