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 #96

Merged
merged 29 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c0a0644
Move WPT script to test/wpt-node
MattiasBuelens Sep 17, 2021
30aebda
Copy server setup from wpt-runner
MattiasBuelens Sep 17, 2021
8f80fd0
Fix paths
MattiasBuelens Sep 17, 2021
9e04927
Move exclusions to separate file
MattiasBuelens Sep 27, 2021
75dad2e
Run WPT in a browser
MattiasBuelens Sep 27, 2021
b85a000
Tweak CLI argument handling
MattiasBuelens Sep 27, 2021
9be6a11
Tweak
MattiasBuelens Sep 27, 2021
233e15e
Speed up by only sending used properties
MattiasBuelens Sep 27, 2021
670927a
Use wpt-runner's version of testharness.js
MattiasBuelens Sep 27, 2021
857ade2
Use own overrides over static file server
MattiasBuelens Sep 27, 2021
1a8017d
Fix indentation
MattiasBuelens Sep 27, 2021
1f01464
Remove unused URLs
MattiasBuelens Sep 27, 2021
9740b2f
Re-use browser instance for both test runs
MattiasBuelens Sep 28, 2021
98d1030
Re-use server across test runs
MattiasBuelens Sep 28, 2021
315a51e
Allow running in Chromium and Firefox
MattiasBuelens Sep 28, 2021
ae6c18c
Checkout submodules at start of CI jobs
MattiasBuelens Sep 28, 2021
9da352a
Rework test scripts
MattiasBuelens Sep 28, 2021
8b56f38
Run browser tests on CI
MattiasBuelens Sep 28, 2021
e2d4e5f
Use actions/setup-node@v2
MattiasBuelens Sep 28, 2021
8013796
Cache npm dependencies
MattiasBuelens Sep 28, 2021
06a6b0e
Simplify
MattiasBuelens Sep 28, 2021
17c61fc
Fix typos
MattiasBuelens Sep 28, 2021
0c8c088
Install only a single browser
MattiasBuelens Sep 28, 2021
e14f458
Use npm ci
MattiasBuelens Sep 28, 2021
ddcab4a
Only run Node 14 tests on merge commits of pull requests
MattiasBuelens Sep 28, 2021
aa8bb65
Rename workflows and jobs
MattiasBuelens Sep 28, 2021
5c94885
Tweak
MattiasBuelens Sep 29, 2021
e032b4b
Fix PR jobs not running when they should
MattiasBuelens Sep 29, 2021
6e5d709
Use on.<event>.types
MattiasBuelens Sep 29, 2021
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
36 changes: 20 additions & 16 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
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: [12.x, 14.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
)
Expand All @@ -19,11 +18,16 @@ jobs:
uses: actions/checkout@v2
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 14
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
run: |
npm install
npm test
node-version: 14
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
- run: npm run test:bundler
48 changes: 40 additions & 8 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: [12.x, 14.x]
node-version: [12, 14]
# 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
with:
submodules: true
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
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
- run: npm run test:bundler

test-browser:
name: ${{ matrix.browser }}
runs-on: ubuntu-latest
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@v2
with:
submodules: true
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
cache: npm
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npx playwright install --with-deps ${{ matrix.browser }}
- run: npm run test:wpt:${{ matrix.browser }}
Loading