Skip to content

Commit

Permalink
fix CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim Sadym committed May 6, 2022
1 parent 862503f commit 0d02f07
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install Python dependencies
run: python -m pip install -r tests/requirements.txt
- name: Run e2e tests
run: CHANNEL=chrome-dev DEBUG=* npm run e2e
run: CHANNEL=chrome-dev npm run e2e
- name: Run examples/cross-browser.py
run: python3 examples/cross-browser.py

Expand Down
128 changes: 64 additions & 64 deletions .github/workflows/wpt.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
## This workflow will check out wpt and run the WebDriver BiDi tests against our
## implementation.
#
#name: web-platform-tests
#
#on:
# pull_request:
# branches: '*'
#
#jobs:
# wpt:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# submodules: true
# - name: Set up Node.js
# uses: actions/setup-node@v1
# with:
# node-version: 16.x
# - name: Install dependencies
# run: npm install
# - name: Build
# run: npm run build
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.9'
# - name: Set up virtualenv
# run: pip install virtualenv
# - name: Set up hosts
# run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
# working-directory: wpt
# # TODO: Install a pinned version of Chromium. This may become possible
# # after https://github.com/web-platform-tests/wpt/issues/28970.
# - name: Install Chromium
# run: ./wpt install chromium browser
# working-directory: wpt
# - name: Run tests
# # For verbose logging, add --log-mach - --log-mach-level info
# run: ./wpt run --webdriver-binary ../runBiDiServer.sh --binary _venv3/browsers/nightly/chrome-linux/chrome --manifest MANIFEST.json --metadata ../wpt-metadata --log-wptreport wptreport.json chromium webdriver/tests/bidi/
# working-directory: wpt
# - name: Update expectations
# if: ${{ always() }}
# run: ./wpt update-expectations --product chromium --manifest MANIFEST.json --metadata ../wpt-metadata wptreport.json
# working-directory: wpt
# - name: Upload expectations
# if: ${{ always() }}
# uses: actions/upload-artifact@v2
# with:
# name: wpt-metadata
# path: wpt-metadata
# - name: Upload logs
# if: ${{ always() }}
# uses: actions/upload-artifact@v2
# with:
# name: logs
# # Note: runBiDiServer.sh will be run multiple times and log.txt will be
# # overwritten. The problem might not be in the log.txt written last.
# path: logs
#
#env:
# FORCE_COLOR: 3
# This workflow will check out wpt and run the WebDriver BiDi tests against our
# implementation.

name: web-platform-tests

on:
pull_request:
branches: '*'

jobs:
wpt:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Set up virtualenv
run: pip install virtualenv
- name: Set up hosts
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
working-directory: wpt
# TODO: Install a pinned version of Chromium. This may become possible
# after https://github.com/web-platform-tests/wpt/issues/28970.
- name: Install Chromium
run: ./wpt install chromium browser
working-directory: wpt
- name: Run tests
# For verbose logging, add --log-mach - --log-mach-level info
run: ./wpt run --webdriver-binary ../runBiDiServer.sh --binary _venv3/browsers/nightly/chrome-linux/chrome --manifest MANIFEST.json --metadata ../wpt-metadata --log-wptreport wptreport.json chromium webdriver/tests/bidi/
working-directory: wpt
- name: Update expectations
if: ${{ always() }}
run: ./wpt update-expectations --product chromium --manifest MANIFEST.json --metadata ../wpt-metadata wptreport.json
working-directory: wpt
- name: Upload expectations
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: wpt-metadata
path: wpt-metadata
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: logs
# Note: runBiDiServer.sh will be run multiple times and log.txt will be
# overwritten. The problem might not be in the log.txt written last.
path: logs

env:
FORCE_COLOR: 3
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"unit": "cross-env TS_NODE_PROJECT='src/tsconfig.json' mocha",
"e2e": "npm run server-no-build & npm run e2e-only",
"e2e-only": "python3 -m pytest -v --timeout=300 --rootdir=tests",
"e2e-only": "python3 -m pytest --rootdir=tests",
"test": "npm run unit",
"server": "npm run build && npm run server-no-build --",
"server-no-build": "node ./src/.build/bidiServer/index.js",
Expand Down
1 change: 0 additions & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pytest===6.1.2
pytest-asyncio==0.14.0
websockets==8.1
pytest-timeout==2.1.0
5 changes: 0 additions & 5 deletions tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


@pytest.mark.asyncio
@pytest.mark.timeout(60)
async def test_consoleLog_logEntryAddedEventEmitted(websocket, context_id):
# Send command.
await send_JSON_command(websocket, {
Expand Down Expand Up @@ -58,7 +57,6 @@ async def test_consoleLog_logEntryAddedEventEmitted(websocket, context_id):


@pytest.mark.asyncio
@pytest.mark.timeout(60)
async def test_consoleInfo_logEntryWithMethodInfoEmitted(websocket, context_id):
# Send command.
await send_JSON_command(websocket, {
Expand All @@ -77,7 +75,6 @@ async def test_consoleInfo_logEntryWithMethodInfoEmitted(websocket, context_id):


@pytest.mark.asyncio
@pytest.mark.timeout(60)
async def test_consoleError_logEntryWithMethodErrorEmitted(websocket,
context_id):
# Send command.
Expand All @@ -97,7 +94,6 @@ async def test_consoleError_logEntryWithMethodErrorEmitted(websocket,


@pytest.mark.asyncio
@pytest.mark.timeout(60)
async def test_consoleLog_logEntryAddedFormatOutput(websocket, context_id):
# Send command.
await send_JSON_command(websocket, {
Expand Down Expand Up @@ -173,7 +169,6 @@ async def test_consoleLog_logEntryAddedFormatOutput(websocket, context_id):


@pytest.mark.asyncio
@pytest.mark.timeout(60)
async def test_exceptionThrown_logEntryAddedEventEmitted(websocket, context_id):
# Send command.
command = {
Expand Down

0 comments on commit 0d02f07

Please sign in to comment.