diff --git a/.travis.yml b/.travis.yml index e354623..4ac4848 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,33 +4,33 @@ python: - "3.3" - "3.4" env: - - BUILD=tests DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=release + - BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=release # Radicale with filesystem storage (default) - - BUILD=tests DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=release + - BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=release PKGS='icalendar==3.6 lxml==3.0 requests==2.4.1 requests_toolbelt==0.3.0 click==3.1' # Minimal requirements - - BUILD=tests DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=devel + - BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=devel # Radicale-git with filesystem storage (default) - - BUILD=tests DAV_SERVER=radicale RADICALE_BACKEND=multifilesystem REQUIREMENTS=devel + - BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=multifilesystem REQUIREMENTS=devel # Radicale-git with multifilesystem storage - - BUILD=tests DAV_SERVER=radicale RADICALE_BACKEND=database REQUIREMENTS=devel + - BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=database REQUIREMENTS=devel # Radicale-git with database storage (release's database storage is broken) - - BUILD=tests DAV_SERVER=owncloud REQUIREMENTS=release + - BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release # Latest ownCloud release - - BUILD=tests DAV_SERVER=baikal REQUIREMENTS=release + - BUILD=test DAV_SERVER=baikal REQUIREMENTS=release # Latest Baikal release - BUILD=style # flake8 with plugins install: - - "./build.sh install_$BUILD" + - "make install-$BUILD" - '[ -z "$PKGS" ] || pip install $PKGS' script: - - "./build.sh $BUILD" + - "make $BUILD" diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 24b0323..bc4b28c 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -37,12 +37,13 @@ For many patches, it might suffice to just let Travis run the tests. However, Travis is slow, so you might want to run them locally too. For this, set up a virtualenv_ and run this inside of it:: - sh build.sh install_tests + make install This will install all dependencies required for the integration tests against the latest release of Radicale (a CalDAV server). Then you can run:: - sh build.sh tests + make test + make style # Stylechecker If you have any questions, feel free to open issues about it. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a74a243 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +install: + make install-test + make install-style + +install-test: + sh build.sh install_tests + +test: + sh build.sh tests + +install-style: + pip install flake8 flake8-import-order + +style: + flake8 + ! grep -ri syncroniz */* + +install-docs: + pip install sphinx sphinx_rtd_theme + pip install -e . + +docs: + cd docs + make html diff --git a/build.sh b/build.sh index d74b1ae..917afde 100755 --- a/build.sh +++ b/build.sh @@ -48,25 +48,6 @@ command__tests() { fi } -command__install_style() { - $PIP_INSTALL flake8 flake8-import-order -} - -command__style() { - flake8 vdirsyncer tests - ! git grep -i syncroniz $(ls | grep -v 'build.sh') -} - -command__install_docs() { - $PIP_INSTALL sphinx sphinx_rtd_theme - $PIP_INSTALL -e . -} - -command__docs() { - cd docs - make html -} - COMMAND="$1" if [ -z "$COMMAND" ]; then