diff --git a/.travis.yml b/.travis.yml index ea1a053f0..497d13f82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,34 +1,60 @@ language: python +sudo: false +dist: bionic + cache: pip +python: + - "3.6" + - "3.7" + +env: + - DJANGO="django>=2.2,<3.0" + - DJANGO="django>=3.0,<3.1" + addons: apt: packages: - sqlite3 + - fping - gdal-bin + - openssl - libproj-dev - libgeos-dev - libspatialite-dev + - spatialite-bin + - libsqlite3-mod-spatialite -python: - - "3.6" +services: + - docker + - redis-server branches: only: - master before_install: + - docker run -d --name influxdb -p 8086:8086 influxdb + - docker exec -it influxdb influx -execute 'CREATE DATABASE openwisp2' + # TODO: this is temporary, remove it when openwisp-utils-0.4.5 is released + - pip install https://github.com/openwisp/openwisp-utils/tarball/master - pip install -U pip wheel setuptools - - pip install --no-cache-dir -U -r requirements-test.txt - - ./runflake8 - - ./runisort + - pip install -U -r requirements-test.txt install: - - python setup.py -q develop + - pip install $DJANGO + - pip install -e . script: + - | + openwisp-utils-qa-checks \ + --migration-path \ + "./openwisp_monitoring/check/migrations \ + ./openwisp_monitoring/device/migrations \ + ./openwisp_monitoring/monitoring/migrations \ + ./openwisp_monitoring/notifications/migrations" \ + --migration-module "check device_monitoring monitoring notifications" - coverage run --source=openwisp_monitoring runtests.py - ./tests/manage.py makemigrations monitoring device check --dry-run | grep "No changes detected"; after_success: coveralls diff --git a/README.rst b/README.rst index 165af298b..8dca4b7d8 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,12 @@ openwisp-monitoring =================== +.. image:: https://travis-ci.com/openwsip/openwisp-monitoring.svg?branch=master + :target: https://travis-ci.com/openwisp/openwisp-monitoring + +.. image:: https://coveralls.io/repos/github/openwisp/openwisp-monitoring/badge.svg?branch=master + :target: https://coveralls.io/github/openwisp/openwisp-monitoring?branch=master + ------------ OpenWISP 2 monitoring module (Work in progress). diff --git a/runflake8 b/runflake8 deleted file mode 100755 index b3d587e04..000000000 --- a/runflake8 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -e -flake8 diff --git a/runisort b/runisort deleted file mode 100755 index f58c8aa7a..000000000 --- a/runisort +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -e -isort --check-only --recursive --diff || exit 1