0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-02-04 21:58:31 +00:00
alerta_alerta/.travis.yml
2019-08-14 09:00:33 +02:00

36 lines
837 B
YAML

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"
- "3.7"
env:
- DB=mongodb DATABASE_URL=mongodb://localhost:27017/alerta5
- DB=postgres DATABASE_URL=postgres://localhost:5432/alerta5
services:
- mongodb
- postgresql
addons:
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 -r requirements.txt
- pip install -r requirements-dev.txt
- pip install .
script:
- pip install coveralls
- python -m mypy alerta/
- pre-commit run -a
- pytest --cov=alerta
- coveralls