Tests #1110
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
name: Tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
concurrency: | |
group: tests-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.8", "3.12"] | |
include: | |
- os: windows-latest | |
python-version: "3.9" | |
- os: macos-latest | |
python-version: "3.11" | |
- os: ubuntu-latest | |
python-version: "3.10" | |
env: | |
OS: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Base setup | |
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Setup conda ${{ matrix.python-version }} | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
environment-file: environment.yml | |
activate-environment: jupyter_kernel_test | |
python-version: ${{ matrix.python-version }} | |
# Xeus Cling Kernel Test is not working - times out. | |
# - name: Install xeus-cling | |
# if: startsWith(runner.os, 'Linux') | |
# run: | | |
# conda install -c conda-forge xeus-cling | |
- name: Run the tests | |
run: hatch run test:test || hatch run test:test | |
test_minimum_versions: | |
name: Test Minimum Versions | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
with: | |
dependency_type: minimum | |
- name: Run the unit tests | |
run: | | |
hatch run test:test || hatch run test:test | |
test_prereleases: | |
name: Test Prereleases | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
with: | |
dependency_type: pre | |
- name: Run the tests | |
run: | | |
hatch run test:test || hatch run test:test | |
make_sdist: | |
name: Make SDist | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1 | |
test_sdist: | |
runs-on: ubuntu-latest | |
needs: [make_sdist] | |
name: Install from SDist and Test | |
timeout-minutes: 15 | |
steps: | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1 | |
with: | |
test_command: hatch run test:test || hatch run test:test | |
check_links: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 | |
test_lint: | |
name: Test Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Run Linters | |
run: | | |
hatch run typing:test | |
hatch run lint:build | |
pipx run 'validate-pyproject[all]' pyproject.toml | |
check_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Check Release | |
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tests_check: # This job does nothing and is only used for the branch protection | |
if: always() | |
needs: | |
- test | |
- test_lint | |
- check_release | |
- test_minimum_versions | |
- test_prereleases | |
- check_links | |
- test_sdist | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |