From 99c33f004d8fdf3a335c14aa5be07fd97083fb74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Dec 2017 02:21:40 +0100 Subject: [PATCH] package/ci: initial Travis config. --- .travis.yml | 1 + CONTRIBUTING.rst | 5 +++++ README.rst | 6 ++++-- package/ci/travis.yml | 44 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 2 deletions(-) create mode 120000 .travis.yml create mode 100644 package/ci/travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 120000 index 00000000..bcbff366 --- /dev/null +++ b/.travis.yml @@ -0,0 +1 @@ +package/ci/travis.yml \ No newline at end of file diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9e11b172..8a633aaa 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -116,6 +116,11 @@ Test organization: files named ``test_something.py`` take their input from case of Doxygen, comment-out the line that removes the ``html`` directory in ``__init__.py`` to see all test output files. +The project is built on Travis CI on Linux with Python 3.4, 3.5 and 3.6; +Doxygen theme is tested only on 3.6 and math rendering is disabled as it's +impossible to get it working on the old Ubuntu 14.04 LTS. Build status is over +at https://travis-ci.org/mosra/m.css. + Contact ======= diff --git a/README.rst b/README.rst index 216296b6..7d1a9b1f 100644 --- a/README.rst +++ b/README.rst @@ -4,9 +4,11 @@ m.css *A no-nonsense, no-JavaScript CSS framework and Pelican theme for content-oriented websites.* +.. image:: https://travis-ci.org/mosra/m.css.svg?branch=master + :target: https://travis-ci.org/mosra/m.css .. image:: https://badges.gitter.im/mosra/m.css.svg - :alt: Join the chat at https://gitter.im/mosra/m.css - :target: https://gitter.im/mosra/m.css?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge + :alt: Join the chat at https://gitter.im/mosra/m.css + :target: https://gitter.im/mosra/m.css?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge Do you *hate* contemporary web development like I do? Do you also feel that it's not right for a web page to take *seconds* and *megabytes* to render? Do diff --git a/package/ci/travis.yml b/package/ci/travis.yml new file mode 100644 index 00000000..03cebade --- /dev/null +++ b/package/ci/travis.yml @@ -0,0 +1,44 @@ +# kate: indent-width 2; + +language: python +matrix: + include: + - python: 3.4 + env: + - WITH_DOXYGEN=OFF + addons: + apt: + packages: + - python: 3.5 + env: + - WITH_DOXYGEN=OFF + - python: 3.6 + env: + - WITH_DOXYGEN=ON + +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 + + # Needed for doxygen binaries + - mkdir -p $HOME/bin && export PATH=$HOME/bin:$PATH + + # 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 + - cd $TRAVIS_BUILD_DIR/pelican-theme && python -m unittest + + # Test plugins. Math plugin is not tested as dvisvgm on 14.04 is unusable. + - cd $TRAVIS_BUILD_DIR/pelican-plugins && python -m unittest + + # 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 && python -m unittest; fi + +# Cache the downloaded doxygen +cache: + directories: + - $HOME/bin -- 2.30.2