This repository has been archived by the owner on Sep 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
/
.travis.yml
68 lines (55 loc) · 2.27 KB
/
.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
# travis.yml for Django
sudo: required
dist: trusty
# Use an older version of trusty until quirks are figured out.
# https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch
group: deprecated-2017Q2
cache: pip
language: python
python:
- 2.7.6
env:
- DISTRIBUTION=cyverse
- DISTRIBUTION=jetstream
services:
- postgresql
- redis-server
addons:
postgresql: "9.6"
before_install:
- export DJANGO_SETTINGS_MODULE=atmosphere.settings
- sudo pg_dropcluster --stop 9.2 main
- sudo pg_dropcluster --stop 9.3 main
- sudo pg_dropcluster --stop 9.4 main
- sudo pg_dropcluster --stop 9.5 main
- sudo pg_lsclusters # For testing purposes
install:
# setuptools and pip-tools are necessary for ./travis/check_properly_generated_requirements.sh
- pip install -U pip==9.0.3 setuptools==44
- pip install pip-tools==1.11.0
before_script:
- psql -c "CREATE USER atmosphere_db_user WITH PASSWORD 'atmosphere_db_pass' CREATEDB;" -U postgres
- psql -c "CREATE DATABASE atmosphere_db WITH OWNER atmosphere_db_user;" -U postgres
script:
- ./travis/check_properly_generated_requirements.sh
# Test production environment
- pip-sync requirements.txt
- cp ./variables.ini.dist ./variables.ini
- ./configure
- python manage.py check
- python manage.py makemigrations --dry-run --check
# Test development envionment
- patch variables.ini variables_for_testing_${DISTRIBUTION}.ini.patch
- ./configure
- pip-sync dev_requirements.txt
- ./travis/check_for_dead_code_with_vulture.sh
# Check that code is formatted
- yapf --diff -p -- $(git ls-files | grep '\.py$')
- prospector --profile prospector_profile.yaml --messages-only -- $(git ls-files | grep '\.py$')
- coverage run manage.py test --keepdb --noinput --settings=atmosphere.settings
- coverage run --append manage.py behave --keepdb --tags ~@skip-if-${DISTRIBUTION} --settings=atmosphere.settings --format rerun --outfile rerun_failing.features
- if [ -f "rerun_failing.features" ]; then python manage.py behave --logging-level DEBUG --capture-stderr --capture --verbosity 3 --keepdb @rerun_failing.features; fi
- python manage.py makemigrations --dry-run --check
after_success:
coveralls