Skip to content

Commit e004d2d

Browse files
authored
Clean up CI (#241)
1 parent 819dce5 commit e004d2d

File tree

6 files changed

+120
-88
lines changed

6 files changed

+120
-88
lines changed

.github/workflows/downstream.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: Test downstream projects
22

33
on:
44
push:
5-
branches: "main"
5+
branches: ["main"]
66
pull_request:
7-
branches: "*"
87

98
jobs:
109
downstream:

.github/workflows/tests.yml

Lines changed: 111 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2,80 +2,65 @@ name: Tests
22

33
on:
44
push:
5-
branches: 'master'
5+
branches: ['main']
66
pull_request:
7-
branches: '*'
8-
9-
defaults:
10-
run:
11-
shell: bash -l {0}
7+
schedule:
8+
- cron: "0 8 * * *"
129

1310
jobs:
1411
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
1714
env:
1815
CI: True
19-
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
16+
PYTHON_VERSION: ${{ matrix.python_version }}
2017
CODECOV_TOKEN: e025254a-fe54-4914-8890-0c26e7aa0d07
2118
strategy:
2219
fail-fast: false
2320
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']
2623
exclude:
27-
- PLATFORM: windows
28-
PYTHON_VERSION: pypy3
24+
- platform: windows
25+
python_version: pypy3
2926
steps:
3027
- name: Checkout
3128
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
5531
- name: Install project dependencies
5632
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]"
6234
- name: Run python tests
6335
# See `setup.cfg` for full test options
6436
run: |
6537
pytest
6638
- name: Upload coverage
6739
run: |
6840
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 .
6959
- name: Build docs
60+
shell: bash -l {0}
7061
run: |
71-
set -eux
7262
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"
7964
8065
check_release:
8166
runs-on: ubuntu-latest
@@ -85,34 +70,8 @@ jobs:
8570
steps:
8671
- name: Checkout
8772
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
11675
- name: Install Dependencies
11776
run: |
11877
pip install -e .
@@ -124,3 +83,79 @@ jobs:
12483
- name: Run Link Check
12584
if: ${{ matrix.group == 'link_check' }}
12685
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

docs/environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ name: jupyterlab_server_documentation
33
channels:
44
- conda-forge
55
dependencies:
6-
- python=3.8
6+
- python=3.9
77
- sphinx<4.0
88
- sphinx-copybutton
99
- pip
1010
- myst-parser
11+
- mistune<1
1112
- pip:
1213
- autodoc-traits
1314
- pydata_sphinx_theme

docs/source/api/handlers.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ Module: :mod:`jupyterlab_server.translations_handler`
6464
.. autoclass:: TranslationsHandler
6565
:members:
6666

67-
.. autofunction:: get_current_locale
68-
6967

7068
Module: :mod:`jupyterlab_server.workspaces_handler`
7169
=====================================================

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["jupyter_packaging>0.9,<2", "jupyter_server"]
2+
requires = ["jupyter_packaging>=0.9", "jupyter_server"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.jupyter-releaser]

setup.cfg

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,28 @@ classifiers =
1616
Intended Audience :: Science/Research
1717
License :: OSI Approved :: BSD License
1818
Programming Language :: Python
19-
Programming Language :: Python :: 3.6
2019
Programming Language :: Python :: 3.7
2120
Programming Language :: Python :: 3.8
2221
Programming Language :: Python :: 3.9
22+
Programming Language :: Python :: 3.10
2323

2424
[options]
2525
zip_safe = False
2626
include_package_data = True
2727
packages = find:
28-
python_requires = >=3.6
28+
python_requires = >=3.7
2929
install_requires =
3030
babel
3131
entrypoints>=0.2.2
32-
jinja2>=2.10
32+
jinja2>=3.0.3
3333
json5
3434
jsonschema>=3.0.1
3535
packaging
3636
requests
37-
jupyter_server~=1.4
38-
37+
jupyter_server~=1.8
3938

4039
[options.extras_require]
41-
test = codecov; ipykernel; pytest>=5.3.2; pytest-cov; jupyter_server[test]; openapi_core~=0.14.0; pytest-console-scripts; strict-rfc3339; ruamel.yaml; wheel
40+
test = codecov; ipykernel; pytest>=5.3.2; pytest-cov; jupyter_server[test]; openapi_core>=0.14.2; pytest-console-scripts; strict-rfc3339; ruamel.yaml; wheel; openapi-spec-validator<0.5
4241

4342
[options.packages.find]
4443
exclude =

0 commit comments

Comments
 (0)