mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
92b6bc0eb9
This reverts commit 75f35e48a8
.
It is unclear how to add/remove dependencies now.
290 lines
8.8 KiB
YAML
290 lines
8.8 KiB
YAML
name: tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
CI: true
|
|
# Force terminal colors. @see https://www.npmjs.com/package/colors
|
|
FORCE_COLOR: 1
|
|
|
|
jobs:
|
|
chromium_linux:
|
|
name: "Chromium Linux"
|
|
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 xvfb
|
|
run: |
|
|
sudo apt-get install xvfb
|
|
- run: npm install
|
|
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
|
|
# Wrap `npm run` in a subshell to redirect STDERR to file.
|
|
- run: xvfb-run --auto-servernum -- bash -c "npm run ccoverage 2>./chromium-linux-testrun.log"
|
|
env:
|
|
DEBUG: "*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-chromium'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: chromium-linux-output
|
|
path: test/output-chromium
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: chromium-linux-testrun.log
|
|
path: chromium-linux-testrun.log
|
|
|
|
chromium_mac:
|
|
name: "Chromium Mac"
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm install
|
|
- run: npm run ctest 2>./chromium-mac-testrun.log
|
|
env:
|
|
DEBUG: "*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-chromium'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: chromium-mac-output
|
|
path: test/output-chromium
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: chromium-mac-testrun.log
|
|
path: chromium-mac-testrun.log
|
|
|
|
chromium_win:
|
|
name: "Chromium Win"
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm install
|
|
- run: npm run ctest 2>./chromium-win-testrun.log
|
|
shell: bash
|
|
env:
|
|
DEBUG: "*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-chromium'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: chromium-win-output
|
|
path: test/output-chromium
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: chromium-win-testrun.log
|
|
path: chromium-win-testrun.log
|
|
|
|
webkit_linux:
|
|
name: "WebKit Linux"
|
|
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 xvfb
|
|
run: |
|
|
sudo apt-get install xvfb
|
|
- run: npm install
|
|
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
|
|
# Wrap `npm run` in a subshell to redirect STDERR to file.
|
|
- run: xvfb-run --auto-servernum -- bash -c "npm run wcoverage 2>./webkit-linux-testrun.log"
|
|
env:
|
|
DEBUG: "*,-pw:wrapped*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-webkit'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: webkit-linux-output
|
|
path: test/output-webkit
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: webkit-linux-testrun.log
|
|
path: webkit-linux-testrun.log
|
|
|
|
webkit_mac:
|
|
name: "WebKit Mac"
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm install
|
|
- run: npm run wtest 2>./webkit-mac-testrun.log
|
|
env:
|
|
DEBUG: "*,-pw:wrapped*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-webkit'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: webkit-mac-output
|
|
path: test/output-webkit
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: webkit-mac-testrun.log
|
|
path: webkit-mac-testrun.log
|
|
|
|
webkit_win:
|
|
name: "WebKit Win"
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm install
|
|
- run: npm run wtest 2>./webkit-win-testrun.log
|
|
shell: bash
|
|
env:
|
|
DEBUG: "*,-pw:wrapped*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-webkit'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: webkit-win-output
|
|
path: test/output-webkit
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: webkit-win-testrun.log
|
|
path: webkit-win-testrun.log
|
|
|
|
firefox_linux:
|
|
name: "Firefox Linux"
|
|
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 xvfb
|
|
run: |
|
|
sudo apt-get install xvfb
|
|
- run: npm install
|
|
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
|
|
# Wrap `npm run` in a subshell to redirect STDERR to file.
|
|
- run: xvfb-run --auto-servernum -- bash -c "npm run fcoverage 2>./firefox-linux-testrun.log"
|
|
env:
|
|
DEBUG: "*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-firefox'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: firefox-linux-output
|
|
path: test/output-firefox
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: firefox-linux-testrun.log
|
|
path: firefox-linux-testrun.log
|
|
|
|
firefox_mac:
|
|
name: "Firefox Mac"
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm install
|
|
- run: npm run ftest 2>./firefox-mac-testrun.log
|
|
env:
|
|
DEBUG: "*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-firefox'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: firefox-mac-output
|
|
path: test/output-firefox
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: firefox-mac-testrun.log
|
|
path: firefox-mac-testrun.log
|
|
|
|
firefox_win:
|
|
name: "Firefox Win"
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm install
|
|
- run: npm run ftest 2>./firefox-win-testrun.log
|
|
shell: bash
|
|
env:
|
|
DEBUG: "*"
|
|
# Ensure output folder exists just in case it was not created by the test run.
|
|
- run: node -e "require('fs').mkdirSync(require('path').join('test', 'output-firefox'), {recursive:true})"
|
|
if: failure()
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: firefox-win-output
|
|
path: test/output-firefox
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: firefox-win-testrun.log
|
|
path: firefox-win-testrun.log
|
|
|
|
test-package-installations:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
# New node.js version supports `--unhandled-rejections=strict` flag that
|
|
# we use in `installation-tests.sh`.
|
|
node-version: 12
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm install
|
|
- run: bash test/installation-tests/installation-tests.sh
|