-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path.travis.yml
55 lines (44 loc) · 2.09 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
env:
global:
- CC_TEST_REPORTER_ID=fe7c323ce09e4094746b1fc88593f9f9315130a1446cc7b20c3ad1a2ada92108
language: ruby
before_install:
- sudo apt-get update
before_install:
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- 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 git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs yarn
- sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
- gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
- curl -sSL https://get.rvm.io | bash -s stable
- source ~/.rvm/scripts/rvm
- rvm install 2.4.1
- rvm use 2.4.1 --default
- gem install bundler
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- sudo apt-get install -y nodejs
- gem install rails -v 5.0.2
- sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
- wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
- sudo apt-get update
- sudo apt-get install postgresql-common
- sudo apt-get install postgresql-9.5 libpq-dev
before_script:
- sudo -u postgres bash -c "psql -c \"CREATE USER shiller WITH PASSWORD 'password';\""
- sudo -u postgres bash -c "psql -c \"ALTER USER shiller CREATEDB;\""
- rails db:create
- rails db:migrate
- gem install cucumber
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- bin/rake db:migrate RAILS_ENV=test
- bin/rake test
script:
- bundle exec rspec
- bundle exec cucumber
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT