| 1 |
name: Test downstream projects |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: ["main"] |
| 6 |
pull_request: |
| 7 |
|
| 8 |
concurrency: |
| 9 |
group: downstream-${{ github.ref }} |
| 10 |
cancel-in-progress: true |
| 11 |
|
| 12 |
jobs: |
| 13 |
ipykernel: |
| 14 |
runs-on: ubuntu-latest |
| 15 |
timeout-minutes: 15 |
| 16 |
steps: |
| 17 |
- uses: actions/checkout@v4 |
| 18 |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 19 |
- uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1 |
| 20 |
with: |
| 21 |
package_name: ipykernel |
| 22 |
|
| 23 |
nbclient: |
| 24 |
runs-on: ubuntu-latest |
| 25 |
timeout-minutes: 15 |
| 26 |
steps: |
| 27 |
- uses: actions/checkout@v4 |
| 28 |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 29 |
- uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1 |
| 30 |
with: |
| 31 |
package_name: nbclient |
| 32 |
env_values: IPYKERNEL_CELL_NAME=\<IPY-INPUT\> |
| 33 |
# Skip test with execution_count mismatch - nbclient test issue, not jupyter_client |
| 34 |
test_command: "pytest -vv -raXxs -W default --durations 10 --color=yes --deselect tests/test_client.py::test_run_all_notebooks[update-display-id.ipynb-opts14]" |
| 35 |
|
| 36 |
nbconvert: |
| 37 |
runs-on: ubuntu-latest |
| 38 |
timeout-minutes: 15 |
| 39 |
steps: |
| 40 |
- uses: actions/checkout@v4 |
| 41 |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 42 |
- uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1 |
| 43 |
with: |
| 44 |
package_name: nbconvert |
| 45 |
package_spec: -e ".[test]" |
| 46 |
|
| 47 |
jupyter_server: |
| 48 |
runs-on: ubuntu-latest |
| 49 |
timeout-minutes: 15 |
| 50 |
steps: |
| 51 |
- uses: actions/checkout@v4 |
| 52 |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 53 |
- uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1 |
| 54 |
with: |
| 55 |
package_name: jupyter_server |
| 56 |
|
| 57 |
jupyter_kernel_test: |
| 58 |
runs-on: ubuntu-latest |
| 59 |
timeout-minutes: 10 |
| 60 |
steps: |
| 61 |
- name: Checkout |
| 62 |
uses: actions/checkout@v4 |
| 63 |
|
| 64 |
- name: Base Setup |
| 65 |
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 66 |
|
| 67 |
- name: Setup conda |
| 68 |
uses: conda-incubator/setup-miniconda@v3 |
| 69 |
with: |
| 70 |
auto-update-conda: true |
| 71 |
activate-environment: jupyter_kernel_test |
| 72 |
miniforge-version: latest |
| 73 |
python-version: "3.10" |
| 74 |
|
| 75 |
- name: Test jupyter_kernel_test |
| 76 |
shell: bash -l {0} |
| 77 |
run: | |
| 78 |
git clone https://github.com/jupyter/jupyter_kernel_test.git |
| 79 |
cd jupyter_kernel_test |
| 80 |
conda env update --name jupyter_kernel_test --file environment.yml |
| 81 |
pip install -e ".[test]" |
| 82 |
python -m unittest -v |
| 83 |
|
| 84 |
qtconsole: |
| 85 |
runs-on: ubuntu-latest |
| 86 |
timeout-minutes: 20 |
| 87 |
steps: |
| 88 |
- name: Checkout |
| 89 |
uses: actions/checkout@v4 |
| 90 |
|
| 91 |
- name: Setup Python |
| 92 |
uses: actions/setup-python@v5 |
| 93 |
with: |
| 94 |
python-version: "3.10" |
| 95 |
architecture: "x64" |
| 96 |
|
| 97 |
- name: Install System Packages |
| 98 |
run: | |
| 99 |
sudo apt-get update |
| 100 |
sudo apt-get install -y --no-install-recommends '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev |
| 101 |
|
| 102 |
- name: Install qtconsole dependencies |
| 103 |
shell: bash -l {0} |
| 104 |
run: | |
| 105 |
cd ${GITHUB_WORKSPACE}/.. |
| 106 |
git clone https://github.com/jupyter/qtconsole.git |
| 107 |
cd qtconsole |
| 108 |
${pythonLocation}/bin/python -m pip install -e ".[test]" |
| 109 |
${pythonLocation}/bin/python -m pip install pyqt5 |
| 110 |
|
| 111 |
- name: Install Jupyter-Client changes |
| 112 |
shell: bash -l {0} |
| 113 |
run: ${pythonLocation}/bin/python -m pip install -e . |
| 114 |
|
| 115 |
- name: Test qtconsole |
| 116 |
shell: bash -l {0} |
| 117 |
run: | |
| 118 |
cd ${GITHUB_WORKSPACE}/../qtconsole |
| 119 |
xvfb-run --auto-servernum ${pythonLocation}/bin/python -m pytest -x -vv -s --full-trace --color=yes qtconsole |
| 120 |
|
| 121 |
downstreams_check: # This job does nothing and is only used for the branch protection |
| 122 |
if: always() |
| 123 |
needs: |
| 124 |
- ipykernel |
| 125 |
- nbclient |
| 126 |
- nbconvert |
| 127 |
- jupyter_server |
| 128 |
- jupyter_kernel_test |
| 129 |
- qtconsole |
| 130 |
runs-on: ubuntu-latest |
| 131 |
steps: |
| 132 |
- name: Decide whether the needed jobs succeeded or failed |
| 133 |
uses: re-actors/alls-green@release/v1 |
| 134 |
with: |
| 135 |
jobs: ${{ toJSON(needs) }} |