Skip to content

Commit

Permalink
CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmooney committed Feb 12, 2024
1 parent 223627a commit 541b6a5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ defaults:

jobs:
tests:
needs: [build]
runs-on: ${{ matrix.os }}

strategy:
Expand Down Expand Up @@ -58,6 +59,10 @@ jobs:
npm run test
working-directory: js

- name: Run pytest
run: |
pytest --no-solara-vuetify-warmup
- name: Build docs (Only on MacOS for build speed)
if: matrix.os == 'macos-latest'
run: |
Expand Down
Binary file added tests/Big.Buck.Bunny.mp4
Binary file not shown.
18 changes: 18 additions & 0 deletions tests/test_new.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from pathlib import Path

import playwright.sync_api
from IPython.display import display

HERE = Path(__file__).parent


def test_stream(ipywidgets_runner, page_session: playwright.sync_api.Page, assert_solara_snapshot):
def kernel_code():
from ipywebrtc import VideoStream

videoStream = VideoStream.from_file(Path(HERE / "Big.Buck.Bunny.mp4"))
display(videoStream)

ipywidgets_runner(kernel_code)
vid = page_session.locator(".widget-image").wait_for()
playwright.sync_api.expect(vid).to_be_visible()

0 comments on commit 541b6a5

Please sign in to comment.