This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 568
/
.travis.yml
65 lines (54 loc) · 1.85 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
63
64
65
language: ruby
node_js:
- 7
sudo: false
before_install:
- sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf
- sed -e 's/^port.*/port = 5432/' /etc/postgresql/10/main/postgresql.conf > postgresql.conf
- sudo chown postgres postgresql.conf
- sudo mv postgresql.conf /etc/postgresql/10/main
- sudo service postgresql stop && sudo service postgresql start $DB_VERSION
- echo "Using postgres version $(psql -U postgres -tc 'SHOW server_version')"
- gem update --system
- gem install bundler
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.24.6
- export PATH=$HOME/.yarn/bin:$PATH
before_script:
- psql -c 'create database classroom_test;' -U postgres
- bundle exec rake db:schema:load
- bundle exec rake factory_bot:lint
script:
- "KNAPSACK_GENERATE_REPORT=true ./bin/rake knapsack:rspec && ./bin/rubocop -D"
cache:
bundler: true
yarn: true
install:
- bundle install --local --without development production --deployment --jobs=3 --retry=3
- yarn install
services:
- redis-server
addons:
apt:
packages:
- postgresql-10
- postgresql-client-10
env:
global:
- CI_NODE_TOTAL=2
- CLASSROOM_WEBHOOK_URL_PREFIX="https://example.com/github/hooks"
- GITHUB_CLIENT_ID=client_id
- GITHUB_CLIENT_SECRET=client_secret
- GOOGLE_CLIENT_ID=google_client_id
- GOOGLE_CLIENT_SECRET=google_client_secret
- RAILS_ENV=test
- RACK_ENV=test
- REDIS_URL="redis://localhost:6379/0"
- WEBHOOK_SECRET=abcdefg
- API_SECRET=abcdefg
matrix:
- CI_NODE_INDEX=0 DB_VERSION=10
- CI_NODE_INDEX=1 DB_VERSION=10
notifications:
email: false
slack:
secure: hYvPi67Ka3T873Roo2WASv6anZUqnkkcvFjUrtxnYwDB14XueP9VXAbFFW8zYl9Uj6eAsPzxbGsGUzW0dUvhHXElffglNnrSh33FtbvrImnzhJvhORYh9+sFK1QWZEKj10oon715kjkRaltu2gqB0fon2bvGgFfdbLQJj8Kh6m8=