Skip to content

Commit 27309bc

Browse files
authored
Merge pull request #36 from bollwyvl/remove-tests-from-dists
Exclude tests from dist
2 parents 60bf9f3 + 069b093 commit 27309bc

File tree

3 files changed

+37
-20
lines changed

3 files changed

+37
-20
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,50 @@ on:
99

1010
jobs:
1111
build:
12-
runs-on: ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}-latest
1313
strategy:
14+
fail-fast: false
1415
matrix:
15-
os: [ubuntu-latest, macos-latest, windows-latest]
16-
python-version: [ '3.6', '3.7', '3.8' ]
17-
16+
os: [ubuntu, macos, windows]
17+
python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy3']
18+
exclude:
19+
- os: windows
20+
python-version: pypy3
1821
steps:
1922
- uses: actions/checkout@v1
2023
- name: Set up Python ${{ matrix.python-version }}
2124
uses: actions/setup-python@v1
2225
with:
2326
python-version: ${{ matrix.python-version }}
24-
- name: Install dependencies
27+
- name: Upgrade pip, etc.
28+
run: |
29+
python -m pip install --user --upgrade pip setuptools wheel
30+
- name: Get pip cache dir
31+
id: pip-cache
32+
run: |
33+
echo "::set-output name=dir::$(pip cache dir)"
34+
- name: Cache pip
35+
uses: actions/cache@v1
36+
with:
37+
path: ${{ steps.pip-cache.outputs.dir }}
38+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
39+
restore-keys: |
40+
${{ runner.os }}-pip-${{ matrix.python-version }}-
41+
${{ runner.os }}-pip-
42+
- name: Install pip dependencies
2543
run: |
26-
python -m pip install --upgrade pip
27-
pip install -v -e ".[test]"
28-
- name: Install Jupyter Server from source
44+
pip install -v -e ".[test]" pytest-cov
45+
- name: Check pip environment
2946
run: |
30-
cd ..
31-
git clone https://github.com/jupyter/jupyter_server.git
32-
cd jupyter_server
33-
pip install -e .
34-
cd ../nbclassic
47+
pip freeze
48+
pip check
49+
# - name: Install Jupyter Server from source
50+
# run: |
51+
# cd ..
52+
# git clone https://github.com/jupyter/jupyter_server.git
53+
# cd jupyter_server
54+
# pip install -e .
55+
# cd ../nbclassic
3556
- name: Test with pytest
3657
run: |
37-
pytest
58+
pytest -vv --cov nbclassic --cov-report term-missing:skip-covered

setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
long_description = long_description,
3333
long_description_content_type="text/markdown",
3434
version = about['__version__'],
35-
packages = find_packages('.'),
35+
packages = find_packages(exclude=['tests*']),
3636
author = 'Jupyter Development Team',
3737
author_email = '[email protected]',
3838
url = 'http://jupyter.org',
@@ -72,5 +72,3 @@
7272

7373
if __name__ == '__main__':
7474
setup(**setup_args)
75-
76-

tests/conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
from traitlets import default
55
from nbclassic.notebookapp import NotebookApp
66

7-
pytest_plugins = ["pytest_jupyter_server"]
8-
97

108
@pytest.fixture
119
def nbapp_log():
@@ -46,4 +44,4 @@ def server_config():
4644
"nbclassic": True
4745
}
4846
}
49-
}
47+
}

0 commit comments

Comments
 (0)