forked from zendesk/samson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (38 loc) · 1.82 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
language: ruby
cache:
bundler: true
directories:
- tmp/rubocop_cache
- node_modules
sudo: false
services:
- mysql
- postgresql
branches:
only: master
env:
matrix:
- TASK='assets:precompile'
- TASK='brakeman'
- TASK='rubocop'
- TASK='flay'
- TASK='bundle_audit'
- PLUGINS='' DATABASE_URL=mysql2://travis@127.0.0.1/samson_test?reconnect=true BUNDLE_WITHOUT=postgres:sqlite USE_UTF8MB4=1 SILENCE_MIGRATIONS=1 TASK='db:create test:migrate_without_plugins'
- DATABASE_URL=mysql2://travis@127.0.0.1/samson_test?reconnect=true BUNDLE_WITHOUT=postgres:sqlite USE_UTF8MB4=1 SILENCE_MIGRATIONS=1 TASK='db:create db:migrate default'
- DATABASE_URL=postgresql://postgres@127.0.0.1/samson_test BUNDLE_WITHOUT=mysql:sqlite SILENCE_MIGRATIONS=1 TASK='db:create db:migrate default'
- DATABASE_URL=sqlite3://null$PWD/db/test.sqlite3 BUNDLE_WITHOUT=postgres:mysql SILENCE_MIGRATIONS=1 TASK='db:create db:migrate default'
before_script:
- mysql -u root -e 'set GLOBAL innodb_large_prefix = true'
- mysql -u root -e 'set GLOBAL innodb_file_per_table = true'
- mysql -u root -e 'set GLOBAL innodb_file_format = "barracuda"'
- mysql -u root -e 'GRANT ALL ON *.* TO 'travis'@'localhost';'
script: bundle exec rake $TASK
# Upload dependencies to fossa so legal team can have an eye on if we can still release as apache v2.
# - not running `fossa test` since that was too brittle
# - ignore on PRs from forks, since they do not get the secure FOSSA_API_KEY env var from travis
matrix:
include:
- env: TASK=fossa # nice label for UI
before_script:
- export BINDIR=$(pwd) && curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
script: ([[ -z "$FOSSA_API_KEY" ]] && [[ "$TRAVIS_PULL_REQUEST" != "false" ]]) || (./fossa init && ./fossa analyze)