-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create new fixtures and fix current_user deprecation warning * Adds tests for the app and handlers * Test stores * Configures file_id_manager in tests * clean up test workflow * pre-commit
- Loading branch information
Showing
8 changed files
with
479 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,19 +16,26 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install jupyterlab | ||
pip install "jupyterlab>=4.0.0,<5" | ||
pip install -e . | ||
jlpm | ||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --hook-stage=manual | ||
|
||
- name: Help message if pre-commit fail | ||
if: ${{ failure() }} | ||
run: | | ||
|
@@ -39,6 +46,7 @@ jobs: | |
echo " pre-commit run" | ||
echo "or after-the-fact on already committed files with" | ||
echo " pre-commit run --all-files --hook-stage=manual" | ||
- name: Lint frontend | ||
run: | | ||
jlpm run lint:check | ||
|
@@ -49,15 +57,21 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install jupyterlab | ||
pip install "jupyterlab>=4.0.0,<5" | ||
pip install -e . | ||
jlpm | ||
- name: Run Tests | ||
run: | | ||
set -eux | ||
|
@@ -72,34 +86,47 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.8", "3.11"] | ||
include: | ||
- os: ubuntu-latest | ||
python-version: "pypy-3.8" | ||
# PyPy is not supported because we use the file_id_manager. See: | ||
# https://github.com/jupyter-server/jupyter_server_fileid/issues/44 | ||
#include: | ||
# - os: ubuntu-latest | ||
# python-version: "pypy-3.8" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
|
||
- name: Install the Python dependencies | ||
run: | | ||
python -m pip install "jupyterlab>=4.0.0,<5" | ||
pip install -e ".[test]" codecov | ||
python -m pip install jupyterlab | ||
- name: List installed packages | ||
run: | | ||
pip freeze | ||
pip check | ||
- name: Run the tests with Coverage | ||
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }} | ||
run: | | ||
python -m pytest -vv --cov jupyter_collaboration --cov-branch --cov-report term-missing:skip-covered | ||
- name: Run the tests on pypy and Windows | ||
if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(runner.os, 'Windows') }} | ||
run: | | ||
python -W ignore::ImportWarning -m pytest -vv | ||
- name: Coverage | ||
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }} | ||
#- name: Run the tests on pypy | ||
# if: ${{ startsWith(matrix.python-version, 'pypy') }} | ||
# run: | | ||
# PyPy is not supported because we use the file_id_manager. See: | ||
# https://github.com/jupyter-server/jupyter_server_fileid/issues/44 | ||
# python -W ignore::ImportWarning -m pytest -vv | ||
|
||
- name: Run the tests on Windows | ||
if: ${{ startsWith(runner.os, 'Windows') }} | ||
run: | | ||
codecov | ||
python -W ignore::ImportWarning -m pytest -vv --cov jupyter_collaboration --cov-branch --cov-report term-missing:skip-covered | ||
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1 | ||
|
||
- name: Build the extension | ||
if: ${{ !startsWith(matrix.python-version, 'pypy') }} | ||
shell: bash | ||
|
@@ -118,12 +145,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
with: | ||
python_version: "3.11" | ||
|
||
- name: Install minimum versions | ||
uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1 | ||
|
||
- name: Run the unit tests | ||
run: | | ||
pytest -vv -W default || pytest -vv -W default --lf | ||
|
@@ -136,15 +166,19 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Base Setup | ||
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
|
||
- name: Install the Python dependencies | ||
run: | | ||
pip install --pre -e ".[test]" | ||
- name: List installed packages | ||
run: | | ||
pip freeze | ||
pip check | ||
- name: Run the tests | ||
run: | | ||
pytest -vv -W default || pytest -vv --lf | ||
|
@@ -166,8 +200,10 @@ jobs: | |
timeout-minutes: 15 | ||
steps: | ||
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | ||
|
||
- name: Download sdist | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Install From SDist | ||
shell: bash | ||
run: | | ||
|
@@ -177,9 +213,10 @@ jobs: | |
mkdir test | ||
tar --strip-components=1 -zxvf *.tar.gz -C ./test | ||
cd test | ||
python -m pip install "jupyterlab>=4.0.0,<5" | ||
python -m pip install ".[test]" | ||
python -m pip install jupyterlab | ||
echo "::endgroup::" | ||
- name: Run Test | ||
shell: bash | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.