Skip to content

Commit

Permalink
Added Travis testing of the docs so that errors are seen sooner
Browse files Browse the repository at this point in the history
  • Loading branch information
markmcdowall committed Jul 12, 2018
1 parent e598884 commit dc491ec
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

language: python

os: linux

python:
- "2.7"
- "3.6"

install:
# Install APIs and Pipelines
- cd ${HOME}/build/Multiscale-Genomics/mg-docs

# Fixed version due to errors in 1.7.3
# TODO test when 1.7.4 is available
- pip install sphinx==1.7.2

script:
./scripts/travis/docs_harness.sh
30 changes: 30 additions & 0 deletions scritps/travis/docs_harness.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

rc=0

cd docs
make html 2> output.err

grep -v "Cannot import \"pycompss\" API packages." output.err > output.tmp.err
grep -v 'Using mock decorators.' output.tmp.err | grep -v 'FutureWarning' | grep -v 'register_converters' > output.err

if [[ -s output.err ]]
then
cat output.err
exit 1
fi

0 comments on commit dc491ec

Please sign in to comment.