-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (58 loc) · 1.73 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
69
70
71
language: python
# Cache the pip files
cache:
directories:
- $HOME/.cache/pip
- $HOME/.nvm
- node_modules
- wger/node_modules
# Use container infrastructure
# http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
sudo: false
# Python versions to test
python:
- "3.5"
services:
- postgresql
# Manually define here the combinations environment variables to test
# https://github.com/travis-ci/travis-ci/issues/1519
env:
- TEST_MOBILE=True DB=postgresql TRAVIS_NODE_VERSION="4"
- TEST_MOBILE=False DB=postgresql TRAVIS_NODE_VERSION="4"
# Install the application
install:
# Update nvm and set wanted Node version.
# We update nvm using the script method instead of git, which is selected
# automatically, as git won't work because the $HOME/.nvm is not a git
# repository and the directory is not empty.
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | METHOD=script bash
- . $HOME/.nvm/nvm.sh
- nvm install $TRAVIS_NODE_VERSION
- nvm use $TRAVIS_NODE_VERSION
# Install requirements
- pip install -r requirements_devel.txt
- pip install coverage
- pip install coveralls
- pip install flake8
- npm install -g gulp@3.9.1
- npm install
# Setup application
- invoke create-settings --database-type postgresql
# Create test databases
before_script:
- psql -c 'DROP DATABASE IF EXISTS test_wger;' -U postgres
- psql -c 'CREATE DATABASE test_wger;' -U postgres
# Do the tests
script:
#Formating
- flake8 wger
#Javascript linting
- gulp lint
# Regular application
- coverage run --source='.' ./manage.py test
# Code coverage
- coverage report
after_script:
- coveralls
notifications:
slack: andela:Gj3Fmrt6Qa9vk6yEf1w7q18n