@@ -3,16 +3,15 @@ name: Tests
3
3
on :
4
4
push :
5
5
branches :
6
- - ' *'
6
+ - ' *'
7
7
pull_request :
8
8
branches :
9
- - ' *'
9
+ - ' *'
10
10
schedule :
11
- - cron : " 0 2 * * 1-5" # run on weekdays at 2:00am UTC
11
+ - cron : ' 0 2 * * 1-5' # run on weekdays at 2:00am UTC
12
12
13
13
jobs :
14
14
test-linux :
15
-
16
15
runs-on : ${{ matrix.os }}
17
16
18
17
strategy :
@@ -22,47 +21,45 @@ jobs:
22
21
python_version : ['3.7', '3.8', '3.9', '3.10']
23
22
24
23
steps :
25
- - uses : actions/checkout@v2
26
-
27
- - name : Setup mamba
28
- uses : conda-incubator/setup-miniconda@v2
29
- with :
30
- miniforge-variant : Mambaforge
31
- channels : conda-forge
32
-
33
- - name : Create the conda environment
34
- shell : bash -l {0}
35
- run : mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
36
-
37
- - name : Install dependencies
38
- shell : bash -l {0}
39
- run : |
40
- whereis python
41
- python --version
42
- yarn install --network-timeout 100000
43
- python -m pip install ".[test]"
44
- (cd tests/test_template; pip install .)
45
- (cd tests/skip_template; pip install .)
46
-
47
- - name : Run tests
48
- shell : bash -l {0}
49
- run : |
50
- VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
51
- voila --help # Making sure we can run `voila --help`
52
- # tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
53
- # Note that wget is the only easily available software that has a read-timeout
54
- voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
55
- sleep 2
56
- wget --read-timeout=5 --tries=1 http://localhost:8878
57
-
58
- - name : Flake8
59
- shell : bash -l {0}
60
- run : |
61
- python -m flake8 voila tests setup.py
24
+ - uses : actions/checkout@v2
62
25
26
+ - name : Setup mamba
27
+ uses : conda-incubator/setup-miniconda@v2
28
+ with :
29
+ miniforge-variant : Mambaforge
30
+ channels : conda-forge
63
31
64
- test-osx :
32
+ - name : Create the conda environment
33
+ shell : bash -l {0}
34
+ run : mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
65
35
36
+ - name : Install dependencies
37
+ shell : bash -l {0}
38
+ run : |
39
+ whereis python
40
+ python --version
41
+ yarn install --network-timeout 100000
42
+ python -m pip install ".[test,dev]"
43
+ (cd tests/test_template; pip install .)
44
+ (cd tests/skip_template; pip install .)
45
+
46
+ - name : Lint check
47
+ shell : bash -l {0}
48
+ run : |
49
+ pre-commit run --all-files --show-diff-on-failure
50
+
51
+ - name : Run tests
52
+ shell : bash -l {0}
53
+ run : |
54
+ VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
55
+ voila --help # Making sure we can run `voila --help`
56
+ # tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
57
+ # Note that wget is the only easily available software that has a read-timeout
58
+ voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
59
+ sleep 2
60
+ wget --read-timeout=5 --tries=1 http://localhost:8878
61
+
62
+ test-osx :
66
63
runs-on : ${{ matrix.os }}
67
64
68
65
strategy :
@@ -72,41 +69,40 @@ jobs:
72
69
python_version : ['3.7', '3.8', '3.9', '3.10']
73
70
74
71
steps :
75
- - uses : actions/checkout@v2
76
-
77
- - name : Setup mamba
78
- uses : conda-incubator/setup-miniconda@v2
79
- with :
80
- miniforge-variant : Mambaforge
81
- channels : conda-forge
82
-
83
- - name : Create the conda environment
84
- shell : bash -l {0}
85
- run : mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
86
-
87
- - name : Install dependencies
88
- shell : bash -l {0}
89
- run : |
90
- whereis python
91
- python --version
92
- yarn install --network-timeout 100000
93
- python -m pip install ".[test]"
94
- (cd tests/test_template; pip install .)
95
- (cd tests/skip_template; pip install .)
96
-
97
- - name : Run tests
98
- shell : bash -l {0}
99
- run : |
100
- py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
101
- voila --help # Making sure we can run `voila --help`
102
- # tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
103
- # Note that wget is the only easily available software that has a read-timeout
104
- voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
105
- sleep 2
106
- wget --read-timeout=5 --tries=1 http://localhost:8878
72
+ - uses : actions/checkout@v2
107
73
108
- test-win :
74
+ - name : Setup mamba
75
+ uses : conda-incubator/setup-miniconda@v2
76
+ with :
77
+ miniforge-variant : Mambaforge
78
+ channels : conda-forge
79
+
80
+ - name : Create the conda environment
81
+ shell : bash -l {0}
82
+ run : mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
109
83
84
+ - name : Install dependencies
85
+ shell : bash -l {0}
86
+ run : |
87
+ whereis python
88
+ python --version
89
+ yarn install --network-timeout 100000
90
+ python -m pip install ".[test]"
91
+ (cd tests/test_template; pip install .)
92
+ (cd tests/skip_template; pip install .)
93
+
94
+ - name : Run tests
95
+ shell : bash -l {0}
96
+ run : |
97
+ py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
98
+ voila --help # Making sure we can run `voila --help`
99
+ # tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
100
+ # Note that wget is the only easily available software that has a read-timeout
101
+ voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 &
102
+ sleep 2
103
+ wget --read-timeout=5 --tries=1 http://localhost:8878
104
+
105
+ test-win :
110
106
runs-on : ${{ matrix.os }}
111
107
112
108
strategy :
@@ -128,7 +124,7 @@ jobs:
128
124
129
125
- name : Install dependencies
130
126
run : |
131
- python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rereunfailures flake8 ipywidgets matplotlib traitlets
127
+ python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rereunfailures ipywidgets matplotlib traitlets
132
128
yarn install --network-timeout 100000
133
129
python -m pip install ".[test]"
134
130
cd tests/test_template
0 commit comments