浏览代码

Merge pull request #8119 from blink1073/labeller-on-master

DevOps fixes
Saul Shanabrook 5 年之前
父节点
当前提交
4b102e48e8
共有 5 个文件被更改,包括 25 次插入13 次删除
  1. 3 2
      .github/workflows/labeler.yml
  2. 1 1
      .github/workflows/tests.yml
  3. 8 3
      jupyterlab/browser_check.py
  4. 4 3
      scripts/appveyor.cmd
  5. 9 4
      scripts/ci_script.sh

+ 3 - 2
.github/workflows/labeler.yml

@@ -2,13 +2,14 @@ name: Pull Request Labeler
 # This workflow is supposed to run every 5 minutes
 on:
   schedule:
-    - cron: '*/10 * * * *'
+    - cron: '*/20 * * * *'
 jobs:
   triage:
     name: Update PR Labels
     runs-on: ubuntu-latest
     steps:
-      - uses: paulfantom/periodic-labeler@dffbc90404f371f76444a69221c2f7ad079e2319
+      - if: github.repository == "jupyterlab/jupyterlab"
+        uses: paulfantom/periodic-labeler@dffbc90404f371f76444a69221c2f7ad079e2319
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_REPOSITORY: ${{ github.repository }}

+ 1 - 1
.github/workflows/tests.yml

@@ -113,7 +113,7 @@ jobs:
     name: Windows
     strategy:
       matrix:
-        group: [python, integrity, application, apputils, cells, codeeditor, codemirror, completer, console, coreutils, csvviewer, docmanager, docregistry, filebrowser, fileeditor, imageviewer, inspector, logconsole, mainmenu, nbformat, notebook, observables, outputarea, rendermime, services, settingregistry, statedb, statusbar, terminal, ui-components]
+        group: [javascript, python, integrity]
       fail-fast: false
     runs-on: windows-latest
     steps:

+ 8 - 3
jupyterlab/browser_check.py

@@ -48,6 +48,9 @@ class LogErrorHandler(logging.Handler):
         # known startup error message
         if 'paste' in record.msg:
             return
+        # handle known shutdown message
+        if 'Stream is closed' in record.msg:
+            return
         return super().filter(record)
 
     def emit(self, record):
@@ -81,13 +84,15 @@ def run_test(app, func):
             app.log.info('Exiting normally')
             result = 0
 
-        app.http_server.stop()
-        app.io_loop.stop()
-        env_patch.stop()
         try:
+            app.http_server.stop()
+            app.io_loop.stop()
+            env_patch.stop()
             os._exit(result)
         except Exception as e:
             self.log.error(str(e))
+            if 'Stream is closed' in str(e):
+                os._exit(result)
             os._exit(1)
 
     # The entry URL for browser tests is different in notebook >= 6.0,

+ 4 - 3
scripts/appveyor.cmd

@@ -20,11 +20,12 @@ IF "%NAME%"=="python" (
     python -m jupyterlab.browser_check
 
 ) ELSE (
-    jlpm run build:packages:scope --scope "@jupyterlab/%NAME%"
+    set NODE_OPTIONS=--max-old-space-size=1028
+    jlpm run build:packages
     if !errorlevel! neq 0 exit /b !errorlevel!
-    jlpm run build:test:scope --scope "@jupyterlab/test-%NAME%"
+    jlpm run build:test
     if !errorlevel! neq 0 exit /b !errorlevel!
-    setx FORCE_COLOR 1 && jlpm run test:scope --loglevel success --scope "@jupyterlab/test-%NAME%"
+    setx FORCE_COLOR 1 && jlpm coverage --loglevel success
 )
 
 if !errorlevel! neq 0 exit /b !errorlevel!

+ 9 - 4
scripts/ci_script.sh

@@ -45,6 +45,9 @@ fi
 
 
 if [[ $GROUP == docs ]]; then
+    # Run the link check - allow for a link to fail once (--lf means only run last failed)
+    py.test --check-links -k .md . || py.test --check-links -k .md --lf .
+
     # Build the docs
     jlpm build:packages
     jlpm docs
@@ -53,12 +56,14 @@ if [[ $GROUP == docs ]]; then
     pushd docs
     pip install sphinx sphinx-copybutton sphinx_rtd_theme recommonmark jsx-lexer
     make html
-    make linkcheck
-    popd
 
-    # Run the link check - allow for a link to fail once
-    py.test --check-links -k .md . || py.test --check-links -k .md --lf .
+    # Remove internal sphinx files and use pytest-check-links on the generated html
+    rm build/html/genindex.html
+    rm build/html/search.html
+    # FIXME: re-enable pending https://github.com/minrk/pytest-check-links/pull/7
+    #py.test --check-links -k .html build/html || py.test --check-links -k .html --lf build/html
 
+    popd
 fi