-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from betatim/travisci
We don't have Travis, yet
- Loading branch information
Showing
8 changed files
with
125 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
language: python | ||
|
||
# Needed so we can spawn docker containers | ||
sudo: required | ||
services: | ||
- docker | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- build-essential | ||
|
||
python: | ||
- 3.5 | ||
- 3.4 | ||
env: | ||
- JHUB_VERSION=master | ||
- JHUB_VERSION=latest # latest released version | ||
|
||
before_install: | ||
- npm install | ||
- npm install -g configurable-http-proxy | ||
- git clone --quiet --depth 1 https://github.com/minrk/travis-wheels travis-wheels | ||
install: ./build_tools/travis/install.sh | ||
|
||
script: | ||
- nose2 -v --start-dir everware # unit tests live in everware/ | ||
- ./build_tools/travis/test_frontend.sh | ||
|
||
# Make travis quiet | ||
notifications: | ||
email: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
import everware | ||
import jupyterhub.handlers.pages | ||
import jupyterhub.handlers.base | ||
|
||
|
||
# TODO: find a way to change default handlers | ||
# instead of this shit | ||
jupyterhub.handlers.base.UserSpawnHandler.get = everware.UserSpawnHandler.get | ||
jupyterhub.handlers.pages.SpawnHandler.post = everware.SpawnHandler.post | ||
jupyterhub.handlers.pages.SpawnHandler.get = everware.SpawnHandler.get | ||
jupyterhub.handlers.pages.SpawnHandler._spawn = everware.SpawnHandler._spawn | ||
jupyterhub.handlers.pages.HomeHandler.get = everware.HomeHandler.get | ||
|
||
c = get_config() | ||
|
||
# spawn with custom docker containers | ||
c.JupyterHub.spawner_class = 'everware.CustomDockerSpawner' | ||
|
||
c.Spawner.tls = False | ||
c.Spawner.debug = True | ||
c.Spawner.start_timeout = 1000 | ||
c.Spawner.remove_containers = True | ||
c.Spawner.tls_assert_hostname = False | ||
c.Spawner.use_docker_client_env = True | ||
|
||
# The docker containers need access to the Hub, so the default loopback | ||
# port doesn't work: | ||
from jupyter_client.localinterfaces import public_ips | ||
c.JupyterHub.hub_ip = public_ips()[0] | ||
c.JupyterHub.hub_api_ip = public_ips()[0] | ||
|
||
c.JupyterHub.data_files_path = 'share' | ||
c.JupyterHub.template_paths = ['share/static/html'] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
c = get_config() | ||
load_subconfig('base_config.py') | ||
|
||
c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /usr/bin/env bash | ||
|
||
if [[ "$JHUB_VERSION" == "master" ]]; then | ||
echo "Using jupyterhub master" | ||
pushd /tmp | ||
git clone --quiet --depth 1 https://github.com/jupyter/jupyterhub.git | ||
cd jupyterhub | ||
pip install -r requirements.txt -e. | ||
python setup.py js | ||
python setup.py css | ||
popd | ||
echo "Done installing jupyterhub master" | ||
fi | ||
|
||
pip install -f travis-wheels/wheelhouse -r requirements.txt . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# This script is meant to be run from the script step in .travis.yml | ||
# The tests run by this script are "frontend" testing | ||
|
||
set -e | ||
echo "In" `pwd` | ||
|
||
# Start a hub that our tests can interact with | ||
echo "Starting everware" | ||
jupyterhub -f build_tools/travis/frontend_test_config.py \ | ||
--no-ssl --debug & | ||
sleep 3 | ||
|
||
echo "Start running frontend tests" | ||
nose2 -v --start-dir frontend_tests |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
import everware | ||
|
||
|
||
c = get_config() | ||
load_subconfig('base_config.py') | ||
|
||
authenticator = everware.GitHubOAuthenticator | ||
c.JupyterHub.authenticator_class = 'everware.GitHubOAuthenticator' | ||
whitelist_file = 'whitelist.txt' | ||
whitelist_handler = everware.DefaultWhitelistHandler(whitelist_file, | ||
c, | ||
authenticator) | ||
c.GitHubOAuthenticator.oauth_callback_url = os.environ['OAUTH_CALLBACK_URL'] | ||
c.GitHubOAuthenticator.client_id = os.environ['GITHUB_CLIENT_ID'] | ||
c.GitHubOAuthenticator.client_secret = os.environ['GITHUB_CLIENT_SECRET'] | ||
|
||
# change this to the ip that `boot2docker ip` or | ||
# `docker-machine ip <vm_name>`tells you if | ||
# you use boot2docker/a VM, otherwise remove the line | ||
c.Spawner.container_ip = '192.168.99.100' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
ipython[notebook] | ||
coveralls | ||
pytest-cov | ||
pytest | ||
nose2 | ||
selenium | ||
jupyterhub-dummyauthenticator | ||
jupyterhub | ||
dockerspawner | ||
GitPython==1.0.1 |