Browse Source

Update the build and add build verification on Travis

Steven Silvester 8 years ago
parent
commit
965087b121
3 changed files with 22 additions and 2 deletions
  1. 4 1
      scripts/travis_install.sh
  2. 10 0
      scripts/travis_script.sh
  3. 8 1
      setup.py

+ 4 - 1
scripts/travis_install.sh

@@ -3,7 +3,6 @@
 # Copyright (c) Jupyter Development Team.
 # Distributed under the terms of the Modified BSD License.
 
-npm install
 wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
 bash miniconda.sh -b -p $HOME/miniconda
 export PATH="$HOME/miniconda/bin:$PATH"
@@ -13,5 +12,9 @@ conda update -q conda
 conda info -a
 conda install jupyter
 
+# Install in-place and install the server extension
+pip install -e .
+jupyter serverextension enable --py jupyterlab
+
 # create jupyter base dir (needed for config retreival)
 mkdir ~/.jupyter

+ 10 - 0
scripts/travis_script.sh

@@ -15,3 +15,13 @@ export PATH="$HOME/miniconda/bin:$PATH"
 npm run build:examples
 npm run docs
 cp jupyter-plugins-demo.gif docs
+
+
+# Make sure we can start and kill the lab server
+jupyter lab --no-browser &
+TASK_PID=$!
+# Make sure the task is running
+ps -p $TASK_PID || exit 1
+sleep 5
+kill $TASK_PID
+wait $TASK_PID

+ 8 - 1
setup.py

@@ -85,9 +85,15 @@ class NPM(Command):
     jlab_node_modules = os.path.join(extension_root, 'node_modules')
 
     targets = [
-        os.path.join(here, 'jupyterlab', 'build', 'bundle.js'),
+        'vendor.css', 'CodeMirror.css', 'main.css',
+        'phosphor.bundle.js', 'services.bundle.js',
+        'vendor.bundle.js', 'CodeMirror.bundle.js',
+        'main.bundle.js'
     ]
 
+    def get_target_path(self, target):
+        return os.path.join(here, 'jupyterlab', 'build', target)
+
     def initialize_options(self):
         pass
 
@@ -114,6 +120,7 @@ class NPM(Command):
         run('npm run build:serverextension')
 
         for t in self.targets:
+            t = self.get_target_path(t)
             if not os.path.exists(t):
                 msg = 'Missing file: %s' % t
                 if not has_npm: