forked from openfoodfoundation/ofn-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (46 loc) · 1.18 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
---
sudo: required
dist: xenial
cache: bundler
language: python
python: "2.7"
services:
- postgresql
addons:
postgresql: "9.5"
env:
- task: LINT
- task: BUILD
before_install:
- |
if [ "${task}" == "BUILD" ]; then
# Remove extra postgres versions from travis
sudo systemctl postgresql stop
sudo apt remove --purge postgresql-9.4* postgresql-9.6* postgresql-10*
sudo rm -f /etc/apt/sources.list.d/pgdg.list
# Remove RVM from travis
rvm implode --force
sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm
sed '/rvm/d' /home/travis/.bashrc
sed '/rvm/d' /home/travis/.bash_profile
sed '/rvm/d' /home/travis/.profile
gem uninstall rvm
unset GEM_HOME
unset GEM_PATH
unset RUBY_VERSION
unset MY_RUBY_HOME
unset IRBRC
fi
install:
- pip install 'ansible==2.7.10'
- pip install 'ansible-lint==4.1.0'
script:
- bin/setup
- |
if [ "${task}" == "LINT" ]; then
ansible-lint playbooks/*.yml --exclude community
fi
- |
if [ "${task}" == "BUILD" ]; then
ansible-playbook tests/suite.yml --limit travis --connection local
fi