forked from WikiEducationFoundation/WikiEduDashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (51 loc) · 1.33 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
env:
# Job 1 skips most of the tests, to minimize the time it takes to deploy to production.
- TEST_SUITE='type:smoke' AFTER_SUCCESS='./travis-deploy-production.sh'
# Job 2 runs the full test suite, and also deploys to staging with JS coverage data
- TEST_SUITE='~type:foo' AFTER_SUCCESS='./travis-deploy-staging.sh'
language: ruby
rvm: 2.7.1
sudo: required
dist: xenial
cache:
apt: true
directories:
- vendor
- node_modules
addons:
chrome: stable
apt:
packages:
- pandoc
services:
- mysql
- redis-server
before_install:
- rvm --default use 2.7.1
- nvm install # use Node version specified in .nvmrc
- export PATH=$PATH:`yarn global bin`
- export DB=test
- export SENDER_EMAIL_ADDRESS='[email protected]'
- node --version
- yarn --version
install:
- yarn install
- gem update --system
- gem install bundler
- gem install rubocop
- gem install rubocop-rspec-focused
- bundle install --jobs=3 --retry=3 --deployment
before_script:
- 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 build
- yarn test
- COVERAGE=true bundle exec rspec --color --profile
--tag $TEST_SUITE
- bundle exec rubocop
- yarn lint-non-build
after_success:
- "$AFTER_SUCCESS"