This repository has been archived by the owner on Oct 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.travis.yml
77 lines (63 loc) · 2.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
language: ruby
rvm:
# The version used at CaaS Platform
- 2.1.9
# Other ruby versions
- 2.3.4
- 2.4.1
# Latest ruby
- ruby-head
env:
- RSPEC_FAIL_FAST=false LDAP_BIND_PASSWORD=Password1234 LDAP_PORT=3389 LDAP_HOST=localhost
# Used to get a better understanding of flaky tests. With a fail fast and a flaky test, the test.log
# file will probably contain relevant information to fix the problem.
# - RSPEC_FAIL_FAST=true
matrix:
allow_failures:
- rvm: ruby-head
- rvm: 2.4.1
cache:
bundler: true
directories:
- $PWD/travis_phantomjs
before_install:
- phantomjs --version
- export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
- if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi
- if [ $(phantomjs --version) != '2.1.1' ]; then wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi
- if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi
- phantomjs --version
# Use the latest stable Node.js
- nvm install stable
- nvm use stable
# Install Yarn
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update
- sudo apt-get install yarn
- yarn install
before_script:
- mkdir /tmp/slapd
- slapd -f travisci-slapd.conf -h ldap://localhost:3389 &
- sleep 5
- ldapadd -H ldap://localhost:3389 -D cn=admin,dc=infra,dc=caasp,dc=local -w Password1234 -f default.ldif
- bundle exec rake db:setup
script:
- yarn eslint
- bundle exec rubocop -V
- bundle exec rubocop
- bundle exec brakeman -c config/brakeman.ignore -z -A
- bundle exec rspec spec
addons:
code_climate:
repo_token: f6e3f94baf7a2d672fa17cd11deb8d3e0709be5350ad0dd11e33f44f54d540bd
mariadb: '10.0'
apt:
packages:
- ldap-utils
- slapd
- libmariadbclient-dev
after_success:
- bundle exec codeclimate-test-reporter
after_failure:
- cat log/test.log