Skip to content

Commit 31d12aa

Browse files
author
Dou Du
committed
update the test workflow
1 parent 6b835ee commit 31d12aa

File tree

2 files changed

+50
-39
lines changed

2 files changed

+50
-39
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: screenshot comparison
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
check-screenshot:
13+
name: Check Screenshot
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Install node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '21.x'
22+
- name: Install Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.11'
26+
architecture: 'x64'
27+
- name: Install dependencies
28+
run:
29+
pip install --upgrade pip
30+
pip install --upgrade jupyterlab
31+
pip install --upgrade voila
32+
pip install --upgrade voila-osscar-template
33+
pip install -e .
34+
35+
- name: Run the voila server
36+
run: |
37+
voila --template=osscar --enable_nbextensions=True example/ --port 8383 --no-browser &
38+
pip install --upgrade pytest
39+
pip install --upgrade selenium
40+
pip install --upgrade Pillow
41+
42+
- uses: nanasess/setup-chromedriver@master
43+
- run: |
44+
export DISPLAY=:99
45+
chromedriver --url-base=/wd/hub &
46+
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
47+
python3 $GITHUB_WORKSPACE/test/test.py
48+
python3 $GITHUB_WORKSPACE/test/test_figures.py
49+

.github/workflows/voila-test.yml renamed to .github/workflows/widget-test.yml

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Voila test
1+
name: widget test
22

33
on:
44
push:
@@ -51,41 +51,3 @@ jobs:
5151
name: artifact
5252
path: './*.png'
5353

54-
check-screenshot:
55-
name: Check Screenshot
56-
runs-on: ubuntu-latest
57-
steps:
58-
- name: Checkout
59-
uses: actions/checkout@v4
60-
- name: Install node
61-
uses: actions/setup-node@v4
62-
with:
63-
node-version: '21.x'
64-
- name: Install Python
65-
uses: actions/setup-python@v5
66-
with:
67-
python-version: '3.11'
68-
architecture: 'x64'
69-
- name: Install dependencies
70-
run:
71-
pip install --upgrade pip
72-
pip install --upgrade jupyterlab
73-
pip install --upgrade voila
74-
pip install --upgrade voila-osscar-template
75-
pip install -e .
76-
77-
- name: Run the voila server
78-
run: |
79-
voila --template=osscar --enable_nbextensions=True example/ --port 8383 --no-browser &
80-
pip install --upgrade pytest
81-
pip install --upgrade selenium
82-
pip install --upgrade Pillow
83-
84-
- uses: nanasess/setup-chromedriver@master
85-
- run: |
86-
export DISPLAY=:99
87-
chromedriver --url-base=/wd/hub &
88-
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
89-
python3 $GITHUB_WORKSPACE/test/test.py
90-
python3 $GITHUB_WORKSPACE/test/test_figures.py
91-

0 commit comments

Comments
 (0)