Skip to content

Commit

Permalink
[CI] Configured travis builds #15
Browse files Browse the repository at this point in the history
Closes #15
  • Loading branch information
pandafy committed Apr 6, 2020
1 parent 783d883 commit 2fec2cb
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 13 deletions.
40 changes: 33 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
3 changes: 0 additions & 3 deletions runflake8

This file was deleted.

3 changes: 0 additions & 3 deletions runisort

This file was deleted.

0 comments on commit 2fec2cb

Please sign in to comment.