-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
53 lines (53 loc) · 1.3 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
dist: focal
language: ruby
rvm:
- 3.2.2
cache: bundler
notifications:
email: false
services:
- postgresql
- redis-server
addons:
postgresql: '13'
apt:
update: true
packages:
- postgresql-13
- redis-tools
- redis-server
env:
global:
- PGUSER=postgres
- PGPORT=5432
- PGHOST=localhost
before_install:
- sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf
- sudo service postgresql restart
- sleep 1
- postgres --version
- psql -c 'create database kudochest_test;' -U postgres
- gem update --system --no-document
- gem install bundler --no-document
- sudo service redis-server stop
- mkdir -p vendor/redis
- wget http://download.redis.io/releases/redis-7.0.0.tar.gz
- tar xzf redis-7.0.0.tar.gz -C vendor/redis --strip-components=1
- cd vendor/redis
- make
- sudo make install
- nohup redis-server &
- cd ../..
install: bundle install
before_script:
- 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:
- bundle exec rubocop
- bundle exec rspec spec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
branches:
only:
- main