parent
358714829a
commit
364ac5257d
@ -0,0 +1,52 @@
|
||||
name: Docs Tests
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu]
|
||||
python-version: [ '3.6' ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Install Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
architecture: 'x64'
|
||||
- name: Upgrade packaging dependencies
|
||||
run: |
|
||||
pip install --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 the Python dependencies
|
||||
run: |
|
||||
pip install -e .[test] codecov
|
||||
pip install -r docs/doc-requirements.txt
|
||||
wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb && sudo dpkg -i pandoc-1.19.1-1-amd64.deb
|
||||
- name: List installed packages
|
||||
run: |
|
||||
pip freeze
|
||||
pip check
|
||||
- name: Run tests on documentation
|
||||
run: |
|
||||
EXIT_STATUS=0
|
||||
make -C docs/ html || EXIT_STATUS=$?
|
||||
pytest --nbval --current-env docs || EXIT_STATUS=$?
|
||||
exit $EXIT_STATUS
|
||||
@ -0,0 +1,61 @@
|
||||
name: Linux JS Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu, macos]
|
||||
group: [notebook, base, services]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Cache pip on Linux
|
||||
uses: actions/cache@v1
|
||||
if: startsWith(runner.os, 'Linux')
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ hashFiles('**/requirements.txt', 'setup.py') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-${{ matrix.python }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade setuptools wheel
|
||||
npm install
|
||||
npm install -g casperjs@1.1.3 phantomjs-prebuilt@2.1.7
|
||||
pip install .[test]
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
python -m notebook.jstest ${{ matrix.group }}
|
||||
@ -0,0 +1,53 @@
|
||||
# The NBConvert Service requires pandoc. Instead of testing
|
||||
# Pandoc on every operating system (which should already be
|
||||
# done in nbconvert directly), we'll only test these services
|
||||
# on ubuntu where we can easily load Pandoc from a Github
|
||||
# Actions docker image (this docker image is not on other
|
||||
# operating systems).
|
||||
name: NBConvert Service Tests
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [ '3.6' , '3.7', '3.8', '3.9' ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Install Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
architecture: 'x64'
|
||||
- name: Setup Pandoc
|
||||
uses: r-lib/actions/setup-pandoc@v1
|
||||
- name: Upgrade packaging dependencies
|
||||
run: |
|
||||
pip install --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 the Python dependencies
|
||||
run: |
|
||||
pip install -e .[test]
|
||||
- name: Run NBConvert Tests
|
||||
run: |
|
||||
pytest notebook/nbconvert/tests/
|
||||
- name: Run NBConvert Service Tests
|
||||
run: |
|
||||
pytest notebook/services/nbconvert/tests/
|
||||
@ -0,0 +1,53 @@
|
||||
name: Python Tests
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu, macos, windows]
|
||||
python-version: [ '3.6' , '3.7', '3.8', '3.9' ] # Windows 3.9 fails due to the pywinpty dependency not working
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Install Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
architecture: 'x64'
|
||||
- name: Upgrade packaging dependencies
|
||||
run: |
|
||||
pip install --upgrade pip setuptools wheel --user
|
||||
- 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 the Python dependencies
|
||||
run: |
|
||||
pip install -e .[test] codecov
|
||||
- name: List installed packages
|
||||
run: |
|
||||
pip freeze
|
||||
pip check
|
||||
- name: Run Server-side tests
|
||||
run: |
|
||||
pytest -vv --cov notebook --cov-branch --cov-report term-missing:skip-covered --ignore-glob=notebook/tests/selenium/* --ignore-glob=notebook/nbconvert/tests/* --ignore-glob=notebook/services/nbconvert/tests/*
|
||||
- name: Run Integration Tests
|
||||
run: |
|
||||
pytest -v notebook/tests/test_notebookapp_integration.py --integration_tests
|
||||
- name: Coverage
|
||||
run: |
|
||||
codecov
|
||||
@ -0,0 +1,46 @@
|
||||
name: Selenium Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu, macos]
|
||||
python-version: [ '3.6', '3.7', '3.8', '3.9' ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
|
||||
- name: Install JS
|
||||
run: |
|
||||
npm install
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python -m pip install -U pip setuptools wheel
|
||||
pip install --upgrade selenium
|
||||
pip install pytest
|
||||
pip install .[test]
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
export JUPYTER_TEST_BROWSER=firefox
|
||||
export MOZ_HEADLESS=1
|
||||
pytest -sv notebook/tests/selenium
|
||||
@ -1,106 +0,0 @@
|
||||
# http://travis-ci.org/#!/ipython/ipython
|
||||
language: python
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/bower
|
||||
- $HOME/.cache/pip
|
||||
python:
|
||||
- 3.6
|
||||
|
||||
env:
|
||||
global:
|
||||
- PATH=$TRAVIS_BUILD_DIR/pandoc:$PATH
|
||||
matrix:
|
||||
- GROUP=js/notebook
|
||||
- GROUP=python
|
||||
- GROUP=js/base
|
||||
- GROUP=js/services
|
||||
|
||||
before_install:
|
||||
- pip install --upgrade pip
|
||||
- pip install --upgrade setuptools wheel pytest pytest-cov coverage codecov
|
||||
- nvm install 6.9.2
|
||||
- nvm use 6.9.2
|
||||
- node --version
|
||||
- npm --version
|
||||
- npm install -g npm
|
||||
- npm install
|
||||
- |
|
||||
if [[ $GROUP == js* ]]; then
|
||||
npm install -g casperjs@1.1.3 phantomjs-prebuilt@2.1.7
|
||||
fi
|
||||
- |
|
||||
if [[ $GROUP == docs ]]; then
|
||||
pip install -r docs/doc-requirements.txt
|
||||
pip install --upgrade pytest
|
||||
fi
|
||||
- |
|
||||
if [[ $GROUP == selenium ]]; then
|
||||
pip install --upgrade selenium pytest
|
||||
# Install Webdriver backend for Firefox:
|
||||
wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz
|
||||
mkdir geckodriver
|
||||
tar -xzf geckodriver-v0.19.1-linux64.tar.gz -C geckodriver
|
||||
export PATH=$PATH:$PWD/geckodriver
|
||||
fi
|
||||
- pip install "attrs>=17.4.0"
|
||||
|
||||
install:
|
||||
- pip install --pre .[test] $EXTRA_PIP
|
||||
- pip freeze
|
||||
- wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb && sudo dpkg -i pandoc-1.19.1-1-amd64.deb
|
||||
|
||||
|
||||
script:
|
||||
- jupyter kernelspec list
|
||||
- |
|
||||
symlinks=$(find . -type l| grep -v './node_modules/' | grep -v './git-hooks')
|
||||
if [[ $(echo $symlinks) ]]; then
|
||||
echo "Repository contains symlinks which won't work on windows:"
|
||||
echo $symlinks
|
||||
echo ""
|
||||
false
|
||||
else
|
||||
true
|
||||
fi
|
||||
- 'if [[ $GROUP == js* ]]; then travis_retry python -m notebook.jstest ${GROUP:3}; fi'
|
||||
- 'if [[ $GROUP == python ]]; then py.test -v --ignore notebook/tests/selenium --cov=notebook notebook; fi'
|
||||
- 'if [[ $GROUP == selenium ]]; then py.test -sv notebook/tests/selenium; fi'
|
||||
- |
|
||||
if [[ $GROUP == docs ]]; then
|
||||
EXIT_STATUS=0
|
||||
make -C docs/ html || EXIT_STATUS=$?
|
||||
|
||||
if [[ $TRAVIS_EVENT_TYPE == cron ]]; then
|
||||
make -C docs/ linkcheck || EXIT_STATUS=$?;
|
||||
fi
|
||||
|
||||
pytest --nbval --current-env docs || EXIT_STATUS=$?
|
||||
exit $EXIT_STATUS
|
||||
fi
|
||||
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- python: 3.6
|
||||
env:
|
||||
- GROUP=selenium
|
||||
- JUPYTER_TEST_BROWSER=firefox
|
||||
- MOZ_HEADLESS=1
|
||||
addons:
|
||||
firefox: 57.0
|
||||
- python: 3.5
|
||||
env: GROUP=python
|
||||
- python: 3.7
|
||||
dist: xenial
|
||||
env: GROUP=python
|
||||
- python: 3.8
|
||||
env: GROUP=python
|
||||
- python: 3.9-dev
|
||||
env: GROUP=python
|
||||
- python: 3.6
|
||||
env: GROUP=docs
|
||||
|
||||
after_success:
|
||||
- codecov
|
||||
@ -1,32 +0,0 @@
|
||||
# miniconda bootstrap from conda-forge recipe
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- CONDA_PY: 36
|
||||
CONDA_PY_SPEC: 3.6
|
||||
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
|
||||
- CONDA_PY: 38
|
||||
CONDA_PY_SPEC: 3.8
|
||||
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
build: off
|
||||
|
||||
install:
|
||||
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
|
||||
- cmd: conda config --set show_channel_urls true
|
||||
- cmd: conda config --add channels conda-forge
|
||||
#- cmd: conda update --yes --quiet conda
|
||||
- cmd: conda install -y python=%CONDA_PY_SPEC% pyzmq tornado jupyter_client nbformat ipykernel pip nodejs pytest nose
|
||||
# not using `conda install -y` on nbconvent package because there is
|
||||
# currently a bug with the version that the anaconda installs, so we will just install it with pip
|
||||
- cmd: pip install nbconvert
|
||||
- cmd: python setup.py build
|
||||
- cmd: pip install .[test]
|
||||
|
||||
test_script:
|
||||
- py.test -v notebook --ignore notebook\tests\selenium
|
||||
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption('--integration_tests', action='store_true', dest="integration_tests",
|
||||
default=False, help="enable integration tests")
|
||||
|
||||
def pytest_configure(config):
|
||||
if not config.option.integration_tests:
|
||||
setattr(config.option, 'markexpr', 'not integration_tests')
|
||||
Loading…
Reference in new issue