-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
62 lines (55 loc) · 2.41 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
language: ruby
rvm:
- 2.6.6
addons:
chrome: stable
postgresql: "12.4"
apt:
packages:
- postgresql-12
- postgresql-client-12
env:
global:
- PGVER=12
- PGPORT=5432
cache:
- bundler: true
sudo: false
bundler_args: --without development
before_install:
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
- gem install bundler -v '< 2'
- curl -s -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.12.deb
- sudo dpkg -i --force-confnew elasticsearch-6.8.12.deb
- sudo sed -i.old 's/-Xms1g/-Xms128m/' /etc/elasticsearch/jvm.options
- sudo sed -i.old 's/-Xmx1g/-Xmx128m/' /etc/elasticsearch/jvm.options
- echo -e '-XX:+DisableExplicitGC\n-Djdk.io.permissionsUseCanonicalPath=true\n-Dlog4j.skipJansi=true\n-server\n' | sudo tee -a /etc/elasticsearch/jvm.options
- sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
- sudo systemctl start elasticsearch
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf
- sudo cp /etc/postgresql/{9.4,12}/main/pg_hba.conf
- sudo pg_ctlcluster 12 main restart
- sleep 10
before_script:
- export TZ='Europe/Bratislava'
- "cp config/database.yml.example config/database.yml"
- "cp config/configuration.yml.example config/configuration.yml"
- RAILS_ENV=fiit_test bundle exec rake db:create
- RAILS_ENV=fiit_test bundle exec rake db:structure:load DB_STRUCTURE=components/university/db/structure.sql
- RAILS_ENV=edx_test bundle exec rake db:create
- RAILS_ENV=edx_test bundle exec rake db:structure:load DB_STRUCTURE=components/mooc/db/structure.sql
- 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:
- RAILS_ENV=fiit_test bundle exec rake rspec:test
- ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.fiit.json
- RAILS_ENV=fiit_test bundle exec rake rspec:test_failed
- RAILS_ENV=fiit_test bundle exec rake rspec:test_failed
- RAILS_ENV=edx_test bundle exec rake rspec:test
- ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.edx.json
- RAILS_ENV=edx_test bundle exec rake rspec:test_failed
- RAILS_ENV=edx_test bundle exec rake rspec:test_failed
after_script:
- ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2
- ./cc-test-reporter upload-coverage