chiark / gitweb /
package/ci: JS testing on Travis.
authorVladimír Vondruš <mosra@centrum.cz>
Sat, 27 Jan 2018 16:41:00 +0000 (17:41 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 3 Feb 2018 09:51:55 +0000 (10:51 +0100)
doxygen/.gitignore
doxygen/test/js-test-data/empty.bin [new file with mode: 0644]
doxygen/test/js-test-data/searchdata.b85 [new file with mode: 0644]
doxygen/test/js-test-data/searchdata.bin [new file with mode: 0644]
doxygen/test/js-test-data/short.bin [new file with mode: 0644]
doxygen/test/js-test-data/wrong-magic.bin [new file with mode: 0644]
doxygen/test/js-test-data/wrong-version.bin [new file with mode: 0644]
package/ci/travis.yml

index ccb3caeba6cf1c63f8827ae4d06bcb8f942ca71a..0f08147fb2d7ccc91c0c640c3231beee74ad3ec3 100644 (file)
@@ -1,4 +1,4 @@
 test/*/html/
 test/*/xml/
-test/js-test-data/
+test/node_modules/
 coverage/
diff --git a/doxygen/test/js-test-data/empty.bin b/doxygen/test/js-test-data/empty.bin
new file mode 100644 (file)
index 0000000..053f032
Binary files /dev/null and b/doxygen/test/js-test-data/empty.bin differ
diff --git a/doxygen/test/js-test-data/searchdata.b85 b/doxygen/test/js-test-data/searchdata.b85
new file mode 100644 (file)
index 0000000..b453a00
--- /dev/null
@@ -0,0 +1 @@
+O+!-v7y$qP0s#O30s#R40{{d704W0i2mk;m0{{*H0B!>S6aWBe0s#X60{|cZ04W0iBme*?0{|)j0B!>SFaQ8)0{}Jv0Br*RJOBVX1OWm7LI40d0{}<>0CEEWPyhgL0{~V40CWQYTmS%L0{~(G0A&IJ1pos8ZU6u&0|0UW04M_hcmM!y0|0&i0BHjNga80-0|1Hu06GK#1OSi#06GHzmH+@{0|1@?0A~XLqyPYJ0|2T30AU9J8UO%oXaE3qumAvZ0|2%F06GK#006`Q06GHz$^Zap0|3$h0CWTc0RRI41pos8-T(k80|4d#04M_h>;M361pwFp0Aca~0BHvR_y7QHXaE3qumAvZ8~^|SGXMYpRR910dH?_bssI20%>V!Z`v3p{O<{Cs0B&JzWpi+0V`WWYbZ9PUbZu-+VRUFZI&EogC@BDLVQpn|aA9L*O<{CsE@*UZY$I)HZcSlyXgWGpWn*-2asXp&VRLg$VRUF;F<&uOWn*-2axQ3eZEQ_pbZ9y{R%K&!Z*n?1ZE0>ODF9<^VRLg$VRUF;F<&uOWn*-2axQ3eZEPcLX>LtnbZ9y{QekdqWdLJrVRLg$VRUF;F<&uKVQyz-E@*UZY)xTwXgWGlVQyz-Iy!A>ZYU`LV{Bn_b4_7%XkRg3F;Zb}XJsyEbZu-SZE0=*
\ No newline at end of file
diff --git a/doxygen/test/js-test-data/searchdata.bin b/doxygen/test/js-test-data/searchdata.bin
new file mode 100644 (file)
index 0000000..916a900
Binary files /dev/null and b/doxygen/test/js-test-data/searchdata.bin differ
diff --git a/doxygen/test/js-test-data/short.bin b/doxygen/test/js-test-data/short.bin
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doxygen/test/js-test-data/wrong-magic.bin b/doxygen/test/js-test-data/wrong-magic.bin
new file mode 100644 (file)
index 0000000..01881b3
Binary files /dev/null and b/doxygen/test/js-test-data/wrong-magic.bin differ
diff --git a/doxygen/test/js-test-data/wrong-version.bin b/doxygen/test/js-test-data/wrong-version.bin
new file mode 100644 (file)
index 0000000..478f0f2
--- /dev/null
@@ -0,0 +1 @@
+MCS\ 1              
\ No newline at end of file
index 8c81babca1643dc1f03fd48f822dfa9fb8308fda..7690588783cc59ef5d474f2baf1e34e8b7694151 100644 (file)
@@ -1,43 +1,62 @@
 # kate: indent-width 2;
 
-language: python
 matrix:
   include:
-    - python: 3.4
+    - language: python
+      python: 3.4
       env:
+      - WITH_THEME=ON
       - WITH_DOXYGEN=OFF
+      - WITH_NODE=OFF
       - JOBID=py34
-    - python: 3.5
+    - language: python
+      python: 3.5
       env:
+      - WITH_THEME=ON
       - WITH_DOXYGEN=OFF
+      - WITH_NODE=OFF
       - JOBID=py35
-    - python: 3.6
+    - language: python
+      python: 3.6
       env:
+      - WITH_THEME=ON
       - WITH_DOXYGEN=ON
+      - WITH_NODE=OFF
       - JOBID=py36
+    - language: node_js
+      node_js: 8
+      env:
+      - WITH_THEME=OFF
+      - WITH_DOXYGEN=OFF
+      - WITH_NODE=ON
+      - JOBID=js
 
 install:
-  # 2.10 has some weird behavior, putting a lot of empty lines into the output
-  - pip install jinja2==2.9.6
-  - pip install pelican Pyphen Pillow coverage codecov
+  # Jinja 2.10 has some weird behavior, putting a lot of empty lines into the
+  # output
+  - if [ "$WITH_THEME" == "ON" ]; then pip install jinja2==2.9.6 pelican Pyphen Pillow coverage codecov; fi
+  - if [ "$WITH_NODE" == "ON" ]; then npm install istanbul codecov; fi
 
   # Needed for doxygen binaries
-  - mkdir -p $HOME/bin && export PATH=$HOME/bin:$PATH
+  - if [ "$WITH_DOXYGEN" == "ON" ]; then mkdir -p $HOME/bin && export PATH=$HOME/bin:$PATH; fi
 
   # Download newer Doxygen, as I don't want to care for the old bugs
   - if [ "$WITH_DOXYGEN" == "ON" ] && [ ! -f $HOME/bin/doxygen ]; then wget "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.linux.bin.tar.gz" && tar -xzf doxygen-1.8.13.linux.bin.tar.gz && cp doxygen-1.8.13/bin/doxygen $HOME/bin && doxygen -v; fi
 
 script:
   # Test the theme. No code coverage there.
-  - cd $TRAVIS_BUILD_DIR/pelican-theme && python -m unittest
+  - if [ "$WITH_THEME" == "ON" ]; then cd $TRAVIS_BUILD_DIR/pelican-theme && python -m unittest; fi
 
   # Test plugins. Math plugin is not tested as dvisvgm on 14.04 is unusable.
-  - cd $TRAVIS_BUILD_DIR/pelican-plugins && coverage run -m unittest && cp .coverage ../.coverage.plugins
+  - if [ "$WITH_THEME" == "ON" ]; then cd $TRAVIS_BUILD_DIR/pelican-plugins && coverage run -m unittest && cp .coverage ../.coverage.plugins; fi
 
   # Test doxygen theme. Math rendering is not tested as dvisvgm on 14.04 is
   # unusable.
   - if [ "$WITH_DOXYGEN" == "ON" ]; then cd $TRAVIS_BUILD_DIR/doxygen && coverage run -m unittest && cp .coverage ../.coverage.doxygen; fi
 
+  # Test client doxygen JS
+  - if [ "$WITH_NODE" == "ON" ]; then cd $TRAVIS_BUILD_DIR && istanbul cover doxygen/test/test-search.js; fi
+
 # Cache the downloaded doxygen
 cache:
   directories:
@@ -52,4 +71,5 @@ notifications:
     on_start: never
 
 after_success:
-  - cd $TRAVIS_BUILD_DIR && coverage combine && codecov
+  - if [ "$WITH_THEME" == "ON" ] || [ "$WITH_DOXYGEN" == "ON" ]; then cd $TRAVIS_BUILD_DIR && coverage combine && codecov; fi
+  - if [ "$WITH_NODE" == "ON" ]; then cd $TRAVIS_BUILD_DIR && codecov; fi