Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

infra(stable): add chrome stable bot (#5768)

Pavel Feldman7fa59f6d94c8
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index c4f21601bc..99169720ac 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -258,3 +258,35 @@ jobs:
with:
name: android-test-results
path: test-results
+
+ chrome_stable:
+ name: "Chrome Stable"
+ strategy:
+ fail-fast: false
+ runs-on: ubuntu-18.04
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 10
+ - uses: microsoft/playwright-github-action@v1
+ - name: Install Chrome Stable
+ run: sudo apt install google-chrome-stable
+ - run: npm ci
+ - run: npm run build
+ - run: mkdir -p coredumps
+ # Set core dump file name pattern
+ - run: sudo bash -c 'echo "$(pwd -P)/coredumps/core-pid_%p.dump" > /proc/sys/kernel/core_pattern'
+ # XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
+ # Wrap `npm run` in a subshell to redirect STDERR to file.
+ # Enable core dumps in the subshell.
+ - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "ulimit -c unlimited && npx folio test/ --workers=1 --forbid-only --timeout=60000 --global-timeout=5400000 --retries=3 --reporter=dot,json -p video"
+ env:
+ BROWSER: "chromium"
+ CRPATH: "/opt/google/chrome/chrome"
+ FOLIO_JSON_OUTPUT_NAME: "test-results/report.json"
+ - uses: actions/upload-artifact@v1
+ if: ${{ always() }}
+ with:
+ name: chrome-stable-test-results
+ path: test-results
diff --git a/test/headful.spec.ts b/test/headful.spec.ts
index beadbaf1fe..7157daecd2 100644
--- a/test/headful.spec.ts
+++ b/test/headful.spec.ts
@@ -175,6 +175,7 @@ fixtures.build().it('focused input should produce the same screenshot', (test, {
test.fail(browserName === 'firefox' && platform === 'darwin', 'headless has thinner outline');
test.fail(browserName === 'firefox' && platform === 'linux', 'headless has no outline');
test.skip(browserName === 'webkit' && platform === 'linux', 'gtk vs wpe');
+ test.skip(process.env.CRPATH);
}, async ({browserType, browserOptions}) => {
const headful = await browserType.launch({...browserOptions, headless: false });
const headfulPage = await headful.newPage();
diff --git a/test/page-screenshot.spec.ts b/test/page-screenshot.spec.ts
index 0c53034093..e60ea1ed22 100644
--- a/test/page-screenshot.spec.ts
+++ b/test/page-screenshot.spec.ts
@@ -192,6 +192,7 @@ describe('page screenshot', (suite, { browserName, headful }) => {
it('should work with a mobile viewport and clip', (test, { browserName }) => {
test.skip(browserName === 'firefox');
+ test.skip(process.env.CRPATH); // Does not work in stable Chrome.
}, async ({browser, server}) => {
const context = await browser.newContext({viewport: { width: 320, height: 480 }, isMobile: true});
const page = await context.newPage();