Skip to content

Commit 0bae110

Browse files
authored
Merge pull request #351 from consideRatio/pr/ci-update
ci: update github actions, small refactors, add dependabot for gha
2 parents cfa3b3d + 9ce60b2 commit 0bae110

File tree

6 files changed

+64
-50
lines changed

6 files changed

+64
-50
lines changed

.github/dependabot.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# dependabot.yml reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
#
3+
# Notes:
4+
# - Status and logs from dependabot are provided at
5+
# https://github.com/jupyterhub/jupyter-server-proxy/network/updates.
6+
# - YAML anchors are not supported here or in GitHub Workflows.
7+
#
8+
version: 2
9+
updates:
10+
# Maintain dependencies in our GitHub Workflows
11+
- package-ecosystem: github-actions
12+
directory: "/" # This should be / rather than .github/workflows
13+
schedule:
14+
interval: weekly
15+
time: "05:00"
16+
timezone: "Etc/UTC"

.github/workflows/linkcheck.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ on:
1919

2020
jobs:
2121
linkcheck:
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-22.04
2323
steps:
24-
- uses: actions/checkout@v2
25-
- uses: actions/setup-python@v2
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-python@v4
2626
with:
27-
python-version: "3.8"
27+
python-version: "3.11"
2828

2929
- name: Install deps
3030
run: pip install -r docs/requirements.txt

.github/workflows/publish.yaml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ on:
3030
workflow_dispatch:
3131

3232
jobs:
33-
3433
build:
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: actions/checkout@v2
34+
runs-on: ubuntu-22.04
3835

39-
- uses: actions/setup-python@v2
36+
steps:
37+
- uses: actions/checkout@v3
38+
- uses: actions/setup-python@v4
4039
with:
41-
python-version: 3.9
40+
python-version: "3.11"
4241

4342
- name: Build dist
4443
run: |
@@ -58,54 +57,63 @@ jobs:
5857
jlpm pack --filename ../jsdist/jupyterlab-server-proxy-jlpmpack.tgz
5958
6059
- name: Upload Python artifact
61-
uses: actions/upload-artifact@v2
60+
uses: actions/upload-artifact@v3
6261
with:
6362
name: dist
6463
path: dist
6564
if-no-files-found: error
6665

6766
- name: Upload Javascript artifact
68-
uses: actions/upload-artifact@v2
67+
uses: actions/upload-artifact@v3
6968
with:
7069
name: jsdist
7170
path: jsdist
7271
if-no-files-found: error
7372

7473
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
7574
publish-pypi:
75+
runs-on: ubuntu-22.04
7676
needs:
7777
- build
78-
runs-on: ubuntu-latest
78+
7979
steps:
80-
- uses: actions/setup-python@v2
80+
- uses: actions/setup-python@v4
81+
with:
82+
python-version: "3.11"
83+
8184
- name: Download artifacts from build
82-
uses: actions/download-artifact@v2
85+
uses: actions/download-artifact@v3
8386
with:
8487
name: dist
8588
path: dist
89+
8690
- name: Publish to PyPI
8791
if: startsWith(github.ref, 'refs/tags')
88-
uses: pypa/gh-action-pypi-publish@v1.3.0
92+
uses: pypa/gh-action-pypi-publish@v1.5.1
8993
with:
9094
password: ${{ secrets.PYPI_PASSWORD }}
9195

9296
# https://docs.github.com/en/actions/language-and-framework-guides/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
9397
publish-npm:
98+
runs-on: ubuntu-22.04
9499
needs:
95100
- build
96-
runs-on: ubuntu-latest
101+
97102
steps:
98103
# actions/setup-node creates an .npmrc file that references NODE_AUTH_TOKEN
99-
- uses: actions/setup-node@v1
104+
- uses: actions/setup-node@v3
100105
with:
101-
node-version: 12.x
106+
node-version: 18.x
102107
registry-url: https://registry.npmjs.org
108+
103109
- name: Download artifacts from build
104-
uses: actions/download-artifact@v2
110+
uses: actions/download-artifact@v3
105111
with:
106112
name: jsdist
107113
path: jsdist
114+
108115
- run: npm publish --dry-run ./jsdist/jupyterlab-server-proxy-jlpmpack.tgz
116+
109117
- run: npm publish ./jsdist/jupyterlab-server-proxy-jlpmpack.tgz
110118
if: startsWith(github.ref, 'refs/tags')
111119
env:

.github/workflows/test.yaml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,24 @@ on:
2727

2828
jobs:
2929
test:
30+
# FIXME: We need ubutnu-20.04 until firefox and geckowebdriver is available
31+
# in ubuntu-22.04. To check if we can upgrade to ubuntu-22.04, see
32+
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#browsers-and-drivers
33+
#
3034
runs-on: ubuntu-20.04
3135

3236
strategy:
33-
# Keep running even if one variation of the job fail
3437
fail-fast: false
3538
matrix:
36-
# We run this job multiple times with different parameterization
37-
# specified below, these parameters have no meaning on their own and
38-
# gain meaning on how job steps use them.
39-
jupyterlab_version: [2, 3]
40-
python: ["3.7", "3.11"]
41-
jupyter_app: [notebook, lab]
39+
jupyterlab-version: ["2", "3"]
40+
python-version: ["3.7", "3.11"]
41+
jupyter-app: [notebook, lab]
4242

4343
steps:
44-
- uses: actions/checkout@v2
45-
46-
- uses: actions/setup-python@v2
44+
- uses: actions/checkout@v3
45+
- uses: actions/setup-python@v4
4746
with:
48-
python-version: "${{ matrix.python }}"
47+
python-version: "${{ matrix.python-version }}"
4948

5049
- name: Build Python package
5150
id: build-package
@@ -60,27 +59,27 @@ jobs:
6059
# Pytest options are set in tests/pytest.ini.
6160
run: |
6261
pip install --upgrade pip
63-
pip install jupyter_packaging jupyterlab~=${{ matrix.jupyterlab_version }}.0
62+
pip install jupyter_packaging jupyterlab~=${{ matrix.jupyterlab-version }}.0
6463
pip install ./dist/jupyter_server_proxy-*.whl
6564
pip install pytest pytest-cov pytest-html
6665
# Ensure we don't accidentally depend on notebook
67-
if [ "${{ matrix.jupyter_app }}" == "notebook" ]; then
66+
if [ "${{ matrix.jupyter-app }}" == "notebook" ]; then
6867
pip install "notebook<7"
6968
fi
7069
pip freeze
7170
7271
- name: Run tests
7372
run: |
74-
JUPYTER_TOKEN=secret jupyter-${{ matrix.jupyter_app }} --config=./tests/resources/jupyter_server_config.py &
73+
JUPYTER_TOKEN=secret jupyter-${{ matrix.jupyter-app }} --config=./tests/resources/jupyter_server_config.py &
7574
sleep 5
7675
cd tests
7776
pytest
7877
7978
- name: Upload pytest and coverage reports
8079
if: always()
81-
uses: actions/upload-artifact@v2
80+
uses: actions/upload-artifact@v3
8281
with:
83-
name: unit-tests-${{matrix.python }}-${{ matrix.jupyter_app }}-${{matrix.jupyterlab_version}}-${{ github.run_number }}
82+
name: unit-tests-${{matrix.python }}-${{ matrix.jupyter-app }}-${{matrix.jupyterlab-version}}-${{ github.run_number }}
8483
path: |
8584
./build/pytest
8685
./build/coverage
@@ -97,7 +96,7 @@ jobs:
9796
jupyter server extension list 2>&1 | grep -ie "jupyter_server_proxy.*enabled" -
9897
9998
- name: Install JupyterLab Extension
100-
if: matrix.jupyterlab_version == '2'
99+
if: matrix.jupyterlab-version == '2'
101100
run: |
102101
cd jupyterlab-server-proxy
103102
jupyter labextension install . --no-build --debug
@@ -120,8 +119,8 @@ jobs:
120119
121120
- name: Upload acceptance test reports
122121
if: always()
123-
uses: actions/upload-artifact@v2
122+
uses: actions/upload-artifact@v3
124123
with:
125-
name: acceptance-tests-${{ matrix.python }}-${{ matrix.jupyter_app }}-${{ matrix.jupyterlab_version }}-${{ github.run_number }}
124+
name: acceptance-tests-${{ matrix.python }}-${{ matrix.jupyter-app }}-${{ matrix.jupyterlab-version }}-${{ github.run_number }}
126125
path: |
127126
./build/robot

.readthedocs.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
version: 2
66

77
build:
8-
os: ubuntu-20.04
8+
os: ubuntu-22.04
99
tools:
10-
python: "3.9"
10+
python: "3.11"
1111

1212
python:
1313
install:
1414
- requirements: docs/requirements.txt
1515

1616
sphinx:
1717
configuration: docs/conf.py
18-
19-
formats: []

docs/conf.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@
4141
# The root toctree document.
4242
root_doc = master_doc = 'index'
4343

44-
# The language for content autogenerated by Sphinx. Refer to documentation
45-
# for a list of supported languages.
46-
#
47-
# This is also used if you do content translation via gettext catalogs.
48-
# Usually you set "language" from the command line for these cases.
49-
language = None
50-
5144
# List of patterns, relative to source directory, that match files and
5245
# directories to ignore when looking for source files.
5346
# This pattern also affects html_static_path and html_extra_path.

0 commit comments

Comments
 (0)