forked from WikiEducationFoundation/WikiEduDashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (58 loc) · 1.88 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
env:
- TEST_SUITE='~type:feature' AFTER_SUCCESS='./travis-deploy.sh'
# Run all tests in job 2
- TEST_SUITE='~type:foo' AFTER_SUCCESS='' CC_TEST_REPORTER_ID=f0d5d763ddc6b3f980ba0fb0c38e7c27c0dffc4a5787cd7d5b8c2b0c3b2e27e2
language: ruby
rvm: 2.5.0
sudo: required
dist: trusty
node_js: 10
cache:
apt: true
directories:
- vendor
- node_modules
addons:
chrome: stable
apt:
packages:
- pandoc
services:
- redis-server
before_install:
- rvm --default use 2.5.0
- export PATH=$PATH:`yarn global bin`
- export DB=test
- export SENDER_EMAIL_ADDRESS='[email protected]'
- node --version
- yarn --version
install:
- yarn global add codeclimate-test-reporter
- yarn install --ignore-engines
- gem install bundler
- gem install rubocop
- gem install rubocop-rspec-focused
- bundle install --jobs=3 --retry=3 --deployment
before_script:
# install Code Climate test reporter
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter before-build; fi
- mkdir tmp -m 777
- cp config/database.travis.yml config/database.yml
- sudo mysql -e "CREATE DATABASE test DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;"
- bundle exec rake db:migrate RAILS_ENV=test
script:
- yarn gulp build
- yarn test
- bundle exec rspec --color --profile --format documentation
--tag $TEST_SUITE
- bundle exec rubocop --rails
after_script:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
after_success:
- "$AFTER_SUCCESS"
notifications:
slack:
# https://agileventures.slack.com/messages/wiki_edu-notify/
secure: LDzHmtPo8jt9wrnH51F8PHTHl2gwOj117+bvWYgtVa4VM7SW1SL+BuiD3+DMs83VTNptek8I/kOduR0lRxIgQMqddYrQRz1O10vOcIXGLOrWbXcx0tgCQjnDcLp4BdBd3k5Ybn1pc/uf7cQXGgCUQ9lAXzAEE+V6CkrCmaCYrVE=