forked from alerta/alerta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (30 loc) · 850 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
if: tag IS present OR type = pull_request OR (branch = master AND type = push) # we only CI the master, tags and PRs
language: python
cache: pip
dist: xenial
python:
- "3.5"
- "3.6"
env:
- DB=mongodb DATABASE_URL=mongodb://localhost:27017/alerta5
- DB=postgres DATABASE_URL=postgres://localhost:5432/alerta5
services:
- mongodb
- postgresql
addons:
apt:
sources:
- mongodb-3.0-precise
packages:
- mongodb-org-server
postgresql: "9.5"
before_script:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS alerta5;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE alerta5;' -U postgres; fi"
install:
- pip install .
- pip install -r requirements.txt
- pip install mypy==0.620
script:
- python -m mypy alerta/
- nosetests --verbosity=3 tests/*