Skip to content

Commit

Permalink
Merge pull request #36 from bollwyvl/remove-tests-from-dists
Browse files Browse the repository at this point in the history
Exclude tests from dist
  • Loading branch information
Zsailer authored Dec 8, 2020
2 parents 60bf9f3 + 069b093 commit 27309bc
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 20 deletions.
49 changes: 35 additions & 14 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,50 @@ on:

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ '3.6', '3.7', '3.8' ]

os: [ubuntu, macos, windows]
python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy3']
exclude:
- os: windows
python-version: pypy3
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Upgrade pip, etc.
run: |
python -m pip install --user --upgrade pip setuptools wheel
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install -v -e ".[test]"
- name: Install Jupyter Server from source
pip install -v -e ".[test]" pytest-cov
- name: Check pip environment
run: |
cd ..
git clone https://github.com/jupyter/jupyter_server.git
cd jupyter_server
pip install -e .
cd ../nbclassic
pip freeze
pip check
# - name: Install Jupyter Server from source
# run: |
# cd ..
# git clone https://github.com/jupyter/jupyter_server.git
# cd jupyter_server
# pip install -e .
# cd ../nbclassic
- name: Test with pytest
run: |
pytest
pytest -vv --cov nbclassic --cov-report term-missing:skip-covered
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
long_description = long_description,
long_description_content_type="text/markdown",
version = about['__version__'],
packages = find_packages('.'),
packages = find_packages(exclude=['tests*']),
author = 'Jupyter Development Team',
author_email = '[email protected]',
url = 'http://jupyter.org',
Expand Down Expand Up @@ -72,5 +72,3 @@

if __name__ == '__main__':
setup(**setup_args)


4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from traitlets import default
from nbclassic.notebookapp import NotebookApp

pytest_plugins = ["pytest_jupyter_server"]


@pytest.fixture
def nbapp_log():
Expand Down Expand Up @@ -46,4 +44,4 @@ def server_config():
"nbclassic": True
}
}
}
}

0 comments on commit 27309bc

Please sign in to comment.