-
Notifications
You must be signed in to change notification settings - Fork 506
146 lines (123 loc) · 4.66 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Tests
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
- cron: '0 2 * * 1-5' # run on weekdays at 2:00am UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python_version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge
- name: Create the conda environment
shell: bash -l {0}
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs=18 yarn=3 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" ipykernel
- name: Install dependencies
shell: bash -l {0}
run: |
whereis python
python --version
yarn install --network-timeout 100000
python -m pip install ".[test,dev]"
(cd tests/test_template; pip install .)
(cd tests/skip_template; pip install .)
- name: Lint check
shell: bash -l {0}
run: |
pre-commit run --all-files --show-diff-on-failure
- name: Run tests
shell: bash -l {0}
run: |
VOILA_TEST_XEUS_CLING=1 py.test tests/app --async-test-timeout=240 --reruns 2 --reruns-delay 1
VOILA_TEST_XEUS_CLING=1 py.test tests/server --async-test-timeout=240 --reruns 2 --reruns-delay 1 --trace
py.test tests/execute_output_test.py
voila --help # Making sure we can run `voila --help`
# tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
# Note that wget is the only easily available software that has a read-timeout
voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
sleep 2
wget --read-timeout=5 --tries=1 http://localhost:8878
# Test nbconvert < 7.6.0
python -m pip install "nbconvert<7.6.0"
VOILA_TEST_XEUS_CLING=1 py.test tests/app/image_inlining_test.py
test-osx:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos]
python_version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- name: Setup mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge
- name: Create the conda environment
shell: bash -l {0}
# TODO unpin pyzmq
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs=18 yarn=3 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" ipykernel pyzmq==25.1.0
- name: Install dependencies
shell: bash -l {0}
run: |
whereis python
python --version
yarn install --network-timeout 100000
python -m pip install ".[test,dev]"
(cd tests/test_template; pip install .)
(cd tests/skip_template; pip install .)
- name: Run tests
shell: bash -l {0}
run: |
py.test tests/app --async-test-timeout=240 --reruns 2 --reruns-delay 1
py.test tests/server --async-test-timeout=240 --reruns 2 --reruns-delay 1 --trace
py.test tests/execute_output_test.py
test-win:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: |
python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures ipywidgets matplotlib traitlets ipykernel
yarn install --network-timeout 100000
python -m pip install ".[test]"
cd tests/test_template
pip install .
cd ../skip_template
pip install .
- name: Run test
run: |
set VOILA_TEST_DEBUG=1
py.test tests/app --async-test-timeout=240 --reruns 2 --reruns-delay 1 -x
py.test tests/server --async-test-timeout=240 --reruns 2 --reruns-delay 1 --trace -x
py.test tests/execute_output_test.py -x