forked from torchbox/wagtail-torchbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (38 loc) · 887 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
38
39
40
41
42
43
44
45
46
47
48
language: python
python: "3.6"
cache:
pip: true
directories:
- node_modules
# Use container-based infrastructure
dist: trusty
sudo: false
# Services
services:
- postgresql
addons:
postgresql: "9.6"
env:
global:
- DJANGO_SETTINGS_MODULE=tbx.settings.production
- DATABASE_URL=postgres://postgres@localhost/test_db
- CFG_SECRET_KEY=iamnotsosecret
- CFG_ALLOWED_HOSTS=localhost
before_script:
# Create a database
- psql -c 'create database test_db;' -U postgres
install:
- pip install wheel
- pip install -r requirements.txt
- pip install flake8
- pip install isort
script:
# Code style, missing imports, etc
- flake8 tbx
- isort --check-only --diff --recursive tbx
# Run system checks
- python manage.py check
# Check for missing migrations
- python manage.py makemigrations --check
# Run tests
- python manage.py test