mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: windows bots via github actions (#678)
Mac will come in a follow up! As a drive-by, removed npm build everywhere, because npm install already runs build.
This commit is contained in:
parent
4a3bd6008b
commit
184b25ff7b
@ -29,7 +29,7 @@ task:
|
||||
dockerfile: .ci/node8/Dockerfile.linux
|
||||
xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24
|
||||
install_script: npm install --unsafe-perm
|
||||
test_script: npm run funit
|
||||
test_script: npm run ftest
|
||||
|
||||
task:
|
||||
osx_instance:
|
||||
|
||||
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# text files must be lf for golden file tests to work
|
||||
*.txt eol=lf
|
||||
*.json eol=lf
|
||||
@ -1,4 +1,4 @@
|
||||
name: Chromium Tests
|
||||
name: Chromium Linux Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -31,6 +31,6 @@ jobs:
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
xvfb-run --auto-servernum npm run unit
|
||||
xvfb-run --auto-servernum npm run ctest
|
||||
env:
|
||||
CI: true
|
||||
32
.github/workflows/chromium-windows.yml
vendored
Normal file
32
.github/workflows/chromium-windows.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Chromium Windows Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: npm install, and test
|
||||
run: |
|
||||
npm install
|
||||
npm run ctest
|
||||
env:
|
||||
CI: true
|
||||
@ -1,4 +1,4 @@
|
||||
name: Firefox Tests
|
||||
name: Firefox Linux Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -30,7 +30,6 @@ jobs:
|
||||
- name: npm install, build, and test
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
xvfb-run --auto-servernum npm run funit
|
||||
xvfb-run --auto-servernum npm run ftest
|
||||
env:
|
||||
CI: true
|
||||
32
.github/workflows/firefox-windows.yml
vendored
Normal file
32
.github/workflows/firefox-windows.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Firefox Windows Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: npm install, and test
|
||||
run: |
|
||||
npm install
|
||||
npm run ftest
|
||||
env:
|
||||
CI: true
|
||||
@ -1,4 +1,4 @@
|
||||
name: WebKit Tests
|
||||
name: WebKit Linux Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -35,7 +35,6 @@ jobs:
|
||||
# The following logs LDD status of all webkit-wpe shared objects and executables.
|
||||
# pushd .local-webkit/$(ls .local-webkit)/minibrowser-wpe; ls -1 | grep -v pw_run.sh | LD_LIBRARY_PATH=$PWD xargs ldd; popd
|
||||
|
||||
npm run build
|
||||
xvfb-run --auto-servernum npm run wunit
|
||||
xvfb-run --auto-servernum npm run wtest
|
||||
env:
|
||||
CI: true
|
||||
32
.github/workflows/webkit-windows.yml
vendored
Normal file
32
.github/workflows/webkit-windows.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: WebKit Windows Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: npm install, and test
|
||||
run: |
|
||||
npm install
|
||||
npm run wtest
|
||||
env:
|
||||
CI: true
|
||||
@ -25,11 +25,10 @@ cache:
|
||||
directories:
|
||||
- node_modules
|
||||
script:
|
||||
- "npm run build"
|
||||
- "npm run lint"
|
||||
- "xvfb-run --auto-servernum npm run unit"
|
||||
- "xvfb-run --auto-servernum npm run funit"
|
||||
- "xvfb-run --auto-servernum npm run wunit"
|
||||
- "xvfb-run --auto-servernum npm run ctest"
|
||||
- "xvfb-run --auto-servernum npm run ftest"
|
||||
- "xvfb-run --auto-servernum npm run wtest"
|
||||
jobs:
|
||||
include:
|
||||
- node_js: "12"
|
||||
|
||||
14
package.json
14
package.json
@ -13,18 +13,18 @@
|
||||
"webkit_revision": "1120"
|
||||
},
|
||||
"scripts": {
|
||||
"unit": "node test/test.js",
|
||||
"funit": "cross-env BROWSER=firefox node test/test.js",
|
||||
"wunit": "cross-env BROWSER=webkit node test/test.js",
|
||||
"debug-unit": "node --inspect-brk test/test.js",
|
||||
"ctest": "cross-env BROWSER=chromium node test/test.js",
|
||||
"ftest": "cross-env BROWSER=firefox node test/test.js",
|
||||
"wtest": "cross-env BROWSER=webkit node test/test.js",
|
||||
"debug-test": "node --inspect-brk test/test.js",
|
||||
"test-doclint": "node utils/doclint/check_public_api/test/test.js && node utils/doclint/preprocessor/test.js",
|
||||
"test": "npm run lint --silent && npm run coverage && npm run test-doclint && node utils/testrunner/test/test.js",
|
||||
"prepare": "node prepare.js",
|
||||
"lint": "([ \"$CI\" = true ] && eslint --quiet -f codeframe --ext js,ts ./src || eslint --ext js,ts ./src) && npm run tsc && npm run doc",
|
||||
"doc": "node utils/doclint/cli.js",
|
||||
"coverage": "cross-env COVERAGE=true npm run unit",
|
||||
"fcoverage": "cross-env COVERAGE=true BROWSER=firefox npm run unit",
|
||||
"wcoverage": "cross-env COVERAGE=true BROWSER=webkit npm run unit",
|
||||
"ccoverage": "cross-env COVERAGE=true npm run ctest",
|
||||
"fcoverage": "cross-env COVERAGE=true BROWSER=firefox node test/test.js",
|
||||
"wcoverage": "cross-env COVERAGE=true BROWSER=webkit node test/test.js",
|
||||
"tsc": "tsc -p .",
|
||||
"clean": "rimraf lib",
|
||||
"build": "node utils/runWebpack.js --mode='development' && tsc -p .",
|
||||
|
||||
@ -24,7 +24,7 @@ const mkdtempAsync = util.promisify(fs.mkdtemp);
|
||||
|
||||
const TMP_FOLDER = path.join(os.tmpdir(), 'pw_tmp_folder-');
|
||||
|
||||
module.exports.describe = function({testRunner, expect, playwright, defaultBrowserOptions, FFOX, CHROMIUM, WEBKIT}) {
|
||||
module.exports.describe = function({testRunner, expect, playwright, defaultBrowserOptions, FFOX, CHROMIUM, WEBKIT, WIN}) {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit, dit} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
@ -67,7 +67,8 @@ module.exports.describe = function({testRunner, expect, playwright, defaultBrows
|
||||
expect(pages).toEqual(['about:blank']);
|
||||
await browser.close();
|
||||
});
|
||||
it('headless should be able to read cookies written by headful', async({server}) => {
|
||||
// see https://github.com/microsoft/playwright/issues/717
|
||||
it.skip(WIN && CHROMIUM)('headless should be able to read cookies written by headful', async({server}) => {
|
||||
const userDataDir = await mkdtempAsync(TMP_FOLDER);
|
||||
// Write a cookie in headful chrome
|
||||
const headfulBrowser = await playwright.launch(Object.assign({userDataDir}, headfulOptions));
|
||||
|
||||
@ -25,7 +25,7 @@ const mkdtempAsync = util.promisify(fs.mkdtemp);
|
||||
|
||||
const TMP_FOLDER = path.join(os.tmpdir(), 'pw_tmp_folder-');
|
||||
|
||||
module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, playwrightPath, product, CHROMIUM, FFOX, WEBKIT}) {
|
||||
module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, playwrightPath, product, CHROMIUM, FFOX, WEBKIT, WIN}) {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit, dit} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
@ -317,8 +317,8 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, p
|
||||
// This might throw. See https://github.com/GoogleChrome/puppeteer/issues/2778
|
||||
await rmAsync(userDataDir).catch(e => {});
|
||||
});
|
||||
// This mysteriously fails on Windows on AppVeyor. See https://github.com/GoogleChrome/puppeteer/issues/4111
|
||||
it.skip(FFOX)('userDataDir option should restore cookies', async({server}) => {
|
||||
// See https://github.com/microsoft/playwright/issues/717
|
||||
it.skip(FFOX || (WIN && CHROMIUM))('userDataDir option should restore cookies', async({server}) => {
|
||||
const userDataDir = await mkdtempAsync(TMP_FOLDER);
|
||||
const options = Object.assign({userDataDir}, defaultBrowserOptions);
|
||||
const browser = await playwright.launch(options);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user