@@ -2,80 +2,65 @@ name: Tests
2
2
3
3
on :
4
4
push :
5
- branches : ' master '
5
+ branches : ['main']
6
6
pull_request :
7
- branches : ' *'
8
-
9
- defaults :
10
- run :
11
- shell : bash -l {0}
7
+ schedule :
8
+ - cron : " 0 8 * * *"
12
9
13
10
jobs :
14
11
test :
15
- name : ${{ matrix.PLATFORM }} py ${{ matrix.PYTHON_VERSION }}
16
- runs-on : ${{ matrix.PLATFORM }}-latest
12
+ name : ${{ matrix.platform }} ${{ matrix.python_version }}
13
+ runs-on : ${{ matrix.platform }}-latest
17
14
env :
18
15
CI : True
19
- PYTHON_VERSION : ${{ matrix.PYTHON_VERSION }}
16
+ PYTHON_VERSION : ${{ matrix.python_version }}
20
17
CODECOV_TOKEN : e025254a-fe54-4914-8890-0c26e7aa0d07
21
18
strategy :
22
19
fail-fast : false
23
20
matrix :
24
- PYTHON_VERSION : ['3.6 ', '3.9 ', 'pypy3 ']
25
- PLATFORM : ['ubuntu', 'macos', 'windows']
21
+ python_version : ['3.7 ', '3.10 ', 'pypy-3.7 ']
22
+ platform : ['ubuntu', 'macos', 'windows']
26
23
exclude :
27
- - PLATFORM : windows
28
- PYTHON_VERSION : pypy3
24
+ - platform : windows
25
+ python_version : pypy3
29
26
steps :
30
27
- name : Checkout
31
28
uses : actions/checkout@v2
32
- - name : Cache pip
33
- uses : actions/cache@v2
34
- with :
35
- path : ~/.cache/pip
36
- key : ${{ runner.os }}-py-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('**/setup.py') }}
37
- - name : Cache conda
38
- uses : actions/cache@v2
39
- with :
40
- path : ~/conda_pkgs_dir
41
- key :
42
- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
43
- hashFiles('docs/environment.yml') }}
44
- - name : Setup conda ${{ matrix.PYTHON_VERSION }}
45
- uses : conda-incubator/setup-miniconda@v2
46
- with :
47
- auto-update-conda : true
48
- python-version : ${{ matrix.python-version }}
49
- - name : Install python dependencies
50
- run : |
51
- conda install setuptools pip wheel
52
- - name : Install pywin32 on Windows
53
- if : ${{ runner.os == 'Windows' }}
54
- run : conda install pywin32
29
+ - name : Base Setup
30
+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
55
31
- name : Install project dependencies
56
32
run : |
57
- pip install -v -e ".[test]" --cache-dir ~/.cache/pip
58
- - run : conda info
59
- - run : conda list
60
- - run : conda config --show
61
- - run : pip check
33
+ pip install -e ".[test]"
62
34
- name : Run python tests
63
35
# See `setup.cfg` for full test options
64
36
run : |
65
37
pytest
66
38
- name : Upload coverage
67
39
run : |
68
40
codecov
41
+
42
+ docs :
43
+ name : Docs Build
44
+ runs-on : ubuntu-latest
45
+ steps :
46
+ - name : Checkout
47
+ uses : actions/checkout@v2
48
+ - name : Base Setup
49
+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
50
+ - uses : conda-incubator/setup-miniconda@v2
51
+ with :
52
+ auto-update-conda : true
53
+ activate-environment : jupyterlab_server_documentation
54
+ environment-file : docs/environment.yml
55
+ - name : Install lib
56
+ shell : bash -l {0}
57
+ run : |
58
+ pip install .
69
59
- name : Build docs
60
+ shell : bash -l {0}
70
61
run : |
71
- set -eux
72
62
pushd docs
73
- conda env create -f environment.yml
74
- conda activate jupyterlab_server_documentation
75
- pip install ..
76
- make html
77
- conda deactivate
78
- popd
63
+ make html SPHINXOPTS="-W"
79
64
80
65
check_release :
81
66
runs-on : ubuntu-latest
85
70
steps :
86
71
- name : Checkout
87
72
uses : actions/checkout@v2
88
- - name : Install Python
89
- uses : actions/setup-python@v2
90
- with :
91
- python-version : 3.9
92
- architecture : " x64"
93
- - name : Get pip cache dir
94
- id : pip-cache
95
- run : |
96
- echo "::set-output name=dir::$(pip cache dir)"
97
- - name : Cache pip
98
- uses : actions/cache@v2
99
- with :
100
- path : ${{ steps.pip-cache.outputs.dir }}
101
- key : ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
102
- restore-keys : |
103
- ${{ runner.os }}-pip-
104
- ${{ runner.os }}-pip-
105
- - name : Cache checked links
106
- if : ${{ matrix.group == 'link_check' }}
107
- uses : actions/cache@v2
108
- with :
109
- path : ~/.cache/pytest-link-check
110
- key : ${{ runner.os }}-linkcheck-${{ hashFiles('**/*.md', '**/*.rst') }}-md-links
111
- restore-keys : |
112
- ${{ runner.os }}-linkcheck-
113
- - name : Upgrade packaging dependencies
114
- run : |
115
- pip install --upgrade pip setuptools wheel --user
73
+ - name : Base Setup
74
+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
116
75
- name : Install Dependencies
117
76
run : |
118
77
pip install -e .
@@ -124,3 +83,79 @@ jobs:
124
83
- name : Run Link Check
125
84
if : ${{ matrix.group == 'link_check' }}
126
85
uses : jupyter-server/jupyter_releaser/.github/actions/check-links@v1
86
+
87
+ test_miniumum_verisons :
88
+ name : Test Minimum Versions
89
+ timeout-minutes : 20
90
+ runs-on : ubuntu-latest
91
+ steps :
92
+ - uses : actions/checkout@v2
93
+ - name : Base Setup
94
+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
95
+ with :
96
+ python_version : " 3.7"
97
+ - name : Install miniumum versions
98
+ uses : jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
99
+ - name : Run the unit tests
100
+ run : pytest -vv|| pytest -vv --lf
101
+
102
+ test_prereleases :
103
+ name : Test Prereleases
104
+ runs-on : ubuntu-latest
105
+ timeout-minutes : 20
106
+ steps :
107
+ - name : Checkout
108
+ uses : actions/checkout@v2
109
+ - name : Base Setup
110
+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
111
+ - name : Install the Python dependencies
112
+ run : |
113
+ pip install --pre -e ".[test]"
114
+ - name : List installed packages
115
+ run : |
116
+ pip freeze
117
+ pip check
118
+ - name : Run the tests
119
+ run : |
120
+ pytest -vv || pytest -vv --lf
121
+
122
+ make_sdist :
123
+ name : Make SDist
124
+ runs-on : ubuntu-latest
125
+ timeout-minutes : 20
126
+ steps :
127
+ - uses : actions/checkout@v2
128
+ - name : Base Setup
129
+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
130
+ - name : Build SDist
131
+ run : |
132
+ pip install build
133
+ python -m build --sdist
134
+ - uses : actions/upload-artifact@v2
135
+ with :
136
+ name : " sdist"
137
+ path : dist/*.tar.gz
138
+
139
+ test_sdist :
140
+ runs-on : ubuntu-latest
141
+ needs : [make_sdist]
142
+ name : Install from SDist and Test
143
+ timeout-minutes : 20
144
+ steps :
145
+ - name : Base Setup
146
+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
147
+ - name : Download sdist
148
+ uses : actions/download-artifact@v2
149
+ - name : Install From SDist
150
+ run : |
151
+ set -ex
152
+ cd sdist
153
+ mkdir test
154
+ tar --strip-components=1 -zxvf *.tar.gz -C ./test
155
+ cd test
156
+ pip install .[test]
157
+ pip install pytest-github-actions-annotate-failures
158
+ - name : Run Test
159
+ run : |
160
+ cd sdist/test
161
+ pytest -vv || pytest -vv --lf
0 commit comments