forked from fecgov/fec-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (47 loc) · 3.63 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
language: python
sudo: false
cache: false
python:
- "3.4"
env:
global:
- secure: "yFhH0tX9KqwPKu8qf6CiJvCTO/4uWNanDdbnKlwPR8LWp5TUNRxaF4X9qYVZBKADCR9ScHqUz93Vv8eBa4X3LY6o3JEm4iVjkIZUs0tUrCdANAn3teVepftHjySLskTijXBIMWm/SLMDL7aWfwJqMhXMA1LacacT2kOKTzlP6zVj/aAB2WUletWauL5rD6CXqVxIoobKfR69liEfwHQco7uxQIkTqvTDnhmDHSk/KqUJNwTl6ZypfG3ZedCQleTs1gh2tGqVkMRtKSnpqK5JHCCOgj0VCpJ1IrGERx9CUQbVBifhAA7mywKUMLcuL66Q7aNEJ+MMVonnYlNZI1TX5JblXp+7Ro0QGKiPz9YE7i2gkvVUh8c9tmIQY+WKKTYweQpGvmw7N6QuAzhQkjKKbMFHYJGX+whJ7llpQ/dW4bBpDoHsbYjt4duoptzaxnu/2Vh2ZqrRDvC5lxbul4gUydDpn+jX9ujlS9lb0eduwyTSCnMfcaxO6GwcerbPX5wPSGXOw6dWfnEmMVsXypoG+bj74y8H3rTcQWtwvYM2qpq/oO1jdDYkEcqDP3lkXFSTQ3rPb+rB8AAlLV6D0/eip3LDfXE6kBvkWJysby/coOZ9IUruSK1F1K/cqq9ZHr3tIsrlJddYCYOhicDKUmojIlr5dHOOterUGMZ+D08P1QM=" # FEC_CF_USERNAME
- secure: "au64J6rsla3I8I+eEmkiZLEVY7hA2qAPDoTvTlNUx2w0lIj0jJnQ+SF/yDTSohpDCTJA/eO4Vaiw4DgyNI4txuSNC7fa4e91I1IHcxGkhQ1+76Z5czM00pTa7MEF6Nz5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0vpLcUh659u8gLxHlbTVkGPfuWRXVhPCmSlHZXqM22gVois5ch97FEm7sgLlJP5hHg1q+utvXV4YDM0m+5SicjGeTyh7ZNszBiMuCu9Na5NaUyhb3XS8niLPwXUzNKcUs0NXckakpqBxstAE4Zyqf3HmmzFQCNvdrFnk6fuRXo1nxtRi1K3N/zf4k=" # DJANGO_SECRET_KEY this is a random key unrelated to prod but needed for django to run build commands with production settings
before_install:
- "pip install --upgrade pip setuptools"
before_script:
- travis_retry pip install -U pip wheel
- travis_retry pip install -r requirements.txt
- travis_retry pip install coverage django_coverage_plugin
- . $HOME/.nvm/nvm.sh
- nvm install v5.5.0
- nvm use v5.5.0
- travis_retry npm install
- npm run build
script:
- (cd fec && coverage run ./manage.py test)
- npm run test-single
after_success:
- travis_retry pip install codecov
# Collect the Python coverage as XML in advance since it needs to run inside
# the fec dir.
- (cd fec && coverage xml)
# Run codecov outside fec dir to include coverage/coverage.json from JS
# testing, and disable it from running `coverage xml` since that's already
# done.
- codecov -X pycov
before_deploy:
- export PATH=$HOME:$PATH
- travis_retry curl -L -o $HOME/cf.tgz "https://cli.run.pivotal.io/stable?release=linux64-binary&version=6.15.0"
- tar xzvf $HOME/cf.tgz -C $HOME
- travis_retry cf install-plugin autopilot -f -r CF-Community
- npm run build
- DJANGO_SETTINGS_MODULE='fec.settings.production' python fec/manage.py collectstatic --noinput
- DJANGO_SETTINGS_MODULE='fec.settings.production' python fec/manage.py compress
deploy:
provider: script
skip_cleanup: true
script: invoke deploy --branch $TRAVIS_BRANCH --yes
on:
all_branches: true