From cdd564f1157ae18e753b0a1da269cdc3421f1f22 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sat, 5 Jul 2014 00:01:14 +0300 Subject: [PATCH 1/4] Break .travis.yml to two files * .travis.yml = the primary Travis config file. * .travis.runonce.bash = the script which we want to run only once per build. --- .travis.runonce.bash | 20 ++++++++++++++++++++ .travis.yml | 42 ++++++++++++++++++++---------------------- 2 files changed, 40 insertions(+), 22 deletions(-) create mode 100755 .travis.runonce.bash diff --git a/.travis.runonce.bash b/.travis.runonce.bash new file mode 100755 index 000000000..a9dcb85b7 --- /dev/null +++ b/.travis.runonce.bash @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# This script does the things that we want Travis to do only once, not in +# every possible build. + +# Set environment +# Which branch are we on? +branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') + +# Check translations +sandbox/check_trans.py plugins/ +sandbox/check_trans.py --core + +# Do these things only on testing or master. +if [[ "$branch" = "master" || "$branch" = "testing" ]]; then + # Notify read the docs + curl -X POST http://readthedocs.org/build/limnoria + # Add other things which we want to do here, before the fi. +else + echo "$branch is not master nor testing, doing nothing." +fi diff --git a/.travis.yml b/.travis.yml index 7bf924849..a9dcb85b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,20 @@ -language: python -python: - - "2.6" - - "2.7" - - "3.2" - - "3.3" - - "3.4" - - "pypy" -# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors -install: - - pip install -vr requirements.txt -# command to run tests, e.g. python setup.py test -script: - - echo $TRAVIS_PYTHON_VERSION - - python setup.py install - - supybot-test test --plugins-dir=./build/lib*/supybot/plugins/ --no-network --disable-multiprocessing --exclude=./build/lib*/supybot/plugins/Scheduler --exclude=./build/lib*/supybot/plugins/Filter -after_success: - - sandbox/check_trans.py --core - - sandbox/check_trans.py plugins/ -notifications: - on_success: never - on_failure: never +#!/usr/bin/env bash +# This script does the things that we want Travis to do only once, not in +# every possible build. + +# Set environment +# Which branch are we on? +branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') + +# Check translations +sandbox/check_trans.py plugins/ +sandbox/check_trans.py --core + +# Do these things only on testing or master. +if [[ "$branch" = "master" || "$branch" = "testing" ]]; then + # Notify read the docs + curl -X POST http://readthedocs.org/build/limnoria + # Add other things which we want to do here, before the fi. +else + echo "$branch is not master nor testing, doing nothing." +fi From a2d910d2f50022a4f75e5d87d52b2f9176046ecb Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sat, 5 Jul 2014 00:03:41 +0300 Subject: [PATCH 2/4] .travis.runonce.bash: add forgotten sphinx --- .travis.runonce.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.runonce.bash b/.travis.runonce.bash index a9dcb85b7..1339ddfca 100755 --- a/.travis.runonce.bash +++ b/.travis.runonce.bash @@ -10,6 +10,12 @@ branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') sandbox/check_trans.py plugins/ sandbox/check_trans.py --core +# Check documentation +cd docs +# Add -W to spinx-build when the documentation doesn't error! +sphinx-build -n -b html -d _build/doctrees . _build/html +cd .. + # Do these things only on testing or master. if [[ "$branch" = "master" || "$branch" = "testing" ]]; then # Notify read the docs From cc1ccb15a0178e5606cfcc042682dba50833abed Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sat, 5 Jul 2014 00:08:12 +0300 Subject: [PATCH 3/4] .travis.runonce.bash: add msgcheck && requirements.txt: add msgcheck & forgotten sphinx. --- .travis.runonce.bash | 2 ++ requirements.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.travis.runonce.bash b/.travis.runonce.bash index 1339ddfca..6e4ac94af 100755 --- a/.travis.runonce.bash +++ b/.travis.runonce.bash @@ -9,6 +9,8 @@ branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') # Check translations sandbox/check_trans.py plugins/ sandbox/check_trans.py --core +msgcheck locales/*.po +msgcheck plugins/*/*/*.po # Check documentation cd docs diff --git a/requirements.txt b/requirements.txt index 35b7e8be8..3aa28cb60 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,5 @@ python-gnupg feedparser sqlalchemy SocksiPy-branch +msgcheck +sphinx From 2fbb279ac26b304ad976b2e04dd7d60718d4521e Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sat, 5 Jul 2014 00:19:30 +0300 Subject: [PATCH 4/4] fix .travis.yml --- .travis.yml | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index a9dcb85b7..9c2cfaecf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,21 @@ -#!/usr/bin/env bash -# This script does the things that we want Travis to do only once, not in -# every possible build. - -# Set environment -# Which branch are we on? -branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') - -# Check translations -sandbox/check_trans.py plugins/ -sandbox/check_trans.py --core - -# Do these things only on testing or master. -if [[ "$branch" = "master" || "$branch" = "testing" ]]; then - # Notify read the docs - curl -X POST http://readthedocs.org/build/limnoria - # Add other things which we want to do here, before the fi. -else - echo "$branch is not master nor testing, doing nothing." -fi +language: python +python: + - "2.6" + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "pypy" +# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors +install: + - pip install -vr requirements.txt +# command to run tests, e.g. python setup.py test +script: + - echo $TRAVIS_PYTHON_VERSION + - python setup.py install + - supybot-test test --plugins-dir=./build/lib*/supybot/plugins/ --no-network --disable-multiprocessing --exclude=./build/lib*/supybot/plugins/Scheduler --exclude=./build/lib*/supybot/plugins/Filter +after_success: + - if [ "$TRAVIS_PYTHON_VERSION" = "3.4" ]; then bash -x .travis.runonce.bash;fi +notifications: + on_success: never + on_failure: never