Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ipykernel / .github / workflows / ci.yml
Size: Mime:
name: ipykernel tests

on:
  push:
    branches: ["main"]
  pull_request:

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

defaults:
  run:
    shell: bash -eux {0}

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ["3.8", "3.11"]
        include:
          - os: windows-latest
            python-version: "3.9"
          - os: ubuntu-latest
            python-version: "pypy-3.8"
          - os: macos-latest
            python-version: "3.10"
          - os: ubuntu-latest
            python-version: "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: |
          pip install .[test] codecov

      - name: Install matplotlib
        if: ${{ !startsWith(matrix.os, 'macos') && !startsWith(matrix.python-version, 'pypy') }}
        run: |
          pip install matplotlib || echo 'failed to install matplotlib'

      - name: Install alternate event loops
        if: ${{ !startsWith(matrix.os, 'windows') }}
        run: |
          pip install curio || echo 'ignoring curio install failure'
          pip install trio || echo 'ignoring trio install failure'

      - name: List installed packages
        run: |
          pip uninstall pipx -y
          pip install pipdeptree
          pipdeptree
          pipdeptree --reverse
          pip freeze
          pip check

      - name: Run the tests
        timeout-minutes: 15
        if: ${{ !startsWith( matrix.python-version, 'pypy' ) && !startsWith(matrix.os, 'windows') }}
        run: |
          hatch run cov:test || hatch run test:test --lf

      - name: Run the tests on pypy and windows
        timeout-minutes: 15
        if: ${{ startsWith( matrix.python-version, 'pypy' ) || startsWith(matrix.os, 'windows') }}
        run: |
          pip install -e ".[test]"
          pytest -vv || pytest -vv --lf

      - name: Coverage
        run: |
          pip install codecov
          codecov

      - name: Check Launcher
        run: |
          cd $HOME
          python -m ipykernel_launcher --help

  pre_commit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
      - uses: jupyterlab/maintainer-tools/.github/actions/pre-commit@v1

  test_docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
      - run: hatch run docs:build

  test_without_debugpy:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        python-version: ["3.9"]
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Base Setup
        uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

      - name: Install the Python dependencies without debugpy
        run: |
          pip install .[test]
          pip uninstall --yes debugpy

      - name: List installed packages
        run: |
          pip freeze

      - name: Run the tests
        timeout-minutes: 10
        run: hatch run test:test

  test_miniumum_versions:
    name: Test Minimum Versions
    timeout-minutes: 20
    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.8"
      - name: Install miniumum 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

  test_prereleases:
    name: Test Prereleases
    runs-on: ubuntu-latest
    timeout-minutes: 20
    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 -W default --lf

  make_sdist:
    name: Make SDist
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v3
      - 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: 20
    steps:
      - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
      - uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1

  link_check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
      - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

  tests_check: # This job does nothing and is only used for the branch protection
    if: always()
    needs:
      - build
      - test_docs
      - test_without_debugpy
      - test_miniumum_versions
      - pre_commit
      - test_prereleases
      - link_check
      - 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) }}