devops(ci): added job for testing package installations (#1572)
Closes #1518
This commit is contained in:
parent
a1f22aae2c
commit
692f4db0a7
40
.github/workflows/tests.yml
vendored
40
.github/workflows/tests.yml
vendored
|
|
@ -197,3 +197,43 @@ jobs:
|
|||
with:
|
||||
name: firefox-win-testrun.log
|
||||
path: firefox-win-testrun.log
|
||||
test-package-installations:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
# chromium dependencies
|
||||
sudo apt-get install libgbm1
|
||||
# webkit dependencies
|
||||
sudo apt-get install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libvpx5 libxslt1.1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.15
|
||||
- run: npm install
|
||||
- run: npm link
|
||||
- name: Running e2e test for playwright
|
||||
run: |
|
||||
npm link playwright-core
|
||||
node install.js
|
||||
node ../../test/e2e/stub.js chromium firefox webkit
|
||||
working-directory: packages/playwright
|
||||
- name: Running e2e test for playwright-chromium
|
||||
run: |
|
||||
npm link playwright-core
|
||||
node install.js
|
||||
node ../../test/e2e/stub.js chromium
|
||||
working-directory: packages/playwright-chromium
|
||||
- name: Running e2e test for playwright-webkit
|
||||
run: |
|
||||
npm link playwright-core
|
||||
node install.js
|
||||
node ../../test/e2e/stub.js webkit
|
||||
working-directory: packages/playwright-webkit
|
||||
- name: Running e2e test for playwright-firefox
|
||||
run: |
|
||||
npm link playwright-core
|
||||
node install.js
|
||||
node ../../test/e2e/stub.js firefox
|
||||
working-directory: packages/playwright-firefox
|
||||
|
|
|
|||
21
test/e2e/stub.js
Normal file
21
test/e2e/stub.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const playwright = require(process.cwd());
|
||||
|
||||
if (process.argv.length === 2) {
|
||||
console.error("Usage stub.js <browser-types-space-separated>");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const browsers = process.argv.slice(2, process.argv.length);
|
||||
|
||||
(async () => {
|
||||
for (const browserType of browsers) {
|
||||
const browser = await playwright[browserType].launch();
|
||||
const context = await browser.newContext();
|
||||
const page = await context.newPage();
|
||||
await page.evaluate(() => navigator.userAgent);
|
||||
await browser.close();
|
||||
}
|
||||
})().catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
Loading…
Reference in a new issue