Skip to content

Commit 4d05b0a

Browse files
authored
ci: Fix failing ci (#116)
1 parent 9633d5c commit 4d05b0a

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

.github/workflows/ipywidgets-bokeh-ci.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,27 @@ jobs:
1515
max-parallel: 3
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
18-
node-version: [18.x]
18+
node-version: [20.x]
19+
python-version: ["3.12"]
1920

2021
defaults:
2122
run:
2223
shell: bash -el {0}
2324

2425
steps:
2526
- name: Set up conda and install base
26-
uses: conda-incubator/setup-miniconda@v2
27+
uses: conda-incubator/setup-miniconda@v3
2728
with:
2829
auto-update-conda: true
2930
activate-environment: test
31+
channels: conda-forge
32+
python-version: ${{ matrix.python-version }}
3033

3134
- name: Checkout the repository
32-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3336

3437
- name: Install node.js ${{ matrix.node-version }}
35-
uses: actions/setup-node@v3
38+
uses: actions/setup-node@v4
3639
with:
3740
node-version: ${{ matrix.node-version }}
3841

@@ -65,13 +68,11 @@ jobs:
6568
- name: Install dev Python dependencies & Playwright browsers
6669
if: success() || failure()
6770
run: |
68-
conda install --channel conda-forge -y pip python
6971
conda info
7072
python -m pip install --editable .[dev]
71-
python -m playwright install --with-deps
73+
python -m playwright install chromium
7274
7375
- name: Run Playwright & Python tests
74-
if: matrix.os != 'windows-latest'
7576
run: |
7677
pytest
7778

tests/conftest.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from panel.tests.conftest import asyncio_loop, server_cleanup # noqa: F401

tests/test_anywidget.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import time
2-
31
import anywidget
42
import panel as pn
53
import traitlets
6-
from panel.io.server import serve
7-
from playwright.sync_api import expect, Page
4+
from panel.tests.util import serve_and_wait
5+
from playwright.sync_api import Page, expect
86

97

108
class CounterWidget(anywidget.AnyWidget):
@@ -33,7 +31,7 @@ class CounterWidget(anywidget.AnyWidget):
3331
count = traitlets.Int(default_value=0).tag(sync=True)
3432

3533

36-
def test_anywidget(page: Page) -> None:
34+
def test_anywidget(page: Page, asyncio_loop) -> None:
3735
"""Test anywidget button counter example."""
3836
# Port to run the panel server on.
3937
port = 5006
@@ -44,8 +42,7 @@ def test_anywidget(page: Page) -> None:
4442

4543
# Serve the button using panel, the time delay is necessary for panel to start and
4644
# serve the widget.
47-
serve(panels=panels, port=port, show=False)
48-
time.sleep(0.2)
45+
serve_and_wait(panels, port=port)
4946

5047
# Go to the page and locate the widget using playwright.
5148
page.goto(f"http://localhost:{port}")

0 commit comments

Comments
 (0)