.travis.yml 4.4 KB
Newer Older
1
language: ruby
2
sudo: false
3 4 5

cache:
  directories:
6
    - vendor/bundle
7 8
    - /tmp/cache/unicode_conformance
    - /tmp/beanstalkd-1.10
9 10
    - node_modules
    - $HOME/.nvm
11 12 13

services:
  - memcached
14
  - redis-server
15 16

addons:
17
  postgresql: "9.6"
18
  chrome: stable
G
George Claghorn 已提交
19 20 21 22
  apt:
    sources:
      - sourceline: "ppa:mc3man/trusty-media"
      - sourceline: "ppa:ubuntuhandbook1/apps"
23
      - mysql-5.7-trusty
24 25 26 27
    packages:
      - ffmpeg
      - mupdf
      - mupdf-tools
28
      - poppler-utils
29 30
      - mysql-server
      - mysql-client
31 32

bundler_args: --without test --jobs 3 --retry 3
J
José Valim 已提交
33
before_install:
34
  - "rm ${BUNDLE_GEMFILE}.lock"
35
  - "travis_retry gem update --system"
36
  - "travis_retry gem install bundler"
37 38
  - "[ -f /tmp/beanstalkd-1.10/Makefile ] || (curl -L https://github.com/kr/beanstalkd/archive/v1.10.tar.gz | tar xz -C /tmp)"
  - "pushd /tmp/beanstalkd-1.10 && make && (./beanstalkd &); popd"
39
  - "[[ -z $encrypted_0fb9444d0374_key && -z $encrypted_0fb9444d0374_iv ]] || openssl aes-256-cbc -K $encrypted_0fb9444d0374_key -iv $encrypted_0fb9444d0374_iv -in activestorage/test/service/configurations.yml.enc -out activestorage/test/service/configurations.yml -d"
40
  - "[[ $GEM != 'av:ujs' ]] || nvm install node"
41 42 43
  - "[[ $GEM != 'av:ujs' ]] || node --version"
  - "[[ $GEM != 'av:ujs' ]] || (cd actionview && npm install)"

44
before_script:
45 46 47 48 49
  # Set Sauce Labs username and access key. Obfuscated, purposefully not encrypted.
  # Decodes to e.g. `export VARIABLE=VALUE`
  - $(base64 --decode <<< "ZXhwb3J0IFNBVUNFX0FDQ0VTU19LRVk9YTAzNTM0M2YtZTkyMi00MGIzLWFhM2MtMDZiM2VhNjM1YzQ4")
  - $(base64 --decode <<< "ZXhwb3J0IFNBVUNFX1VTRVJOQU1FPXJ1YnlvbnJhaWxz")

50 51
script: 'ci/travis.rb'

52
env:
G
George Claghorn 已提交
53 54
  global:
    - "JRUBY_OPTS='--dev -J-Xmx1024M'"
55
  matrix:
G
George Claghorn 已提交
56 57 58 59 60 61 62 63
    - "GEM=railties"
    - "GEM=ap,ac"
    - "GEM=am,amo,as,av,aj,ast"
    - "GEM=as PRESERVE_TIMEZONES=1"
    - "GEM=ar:sqlite3"
    - "GEM=ar:postgresql"
    - "GEM=guides"
    - "GEM=ac:integration"
64

65
rvm:
66 67
  - 2.4.4
  - 2.5.1
G
George Claghorn 已提交
68 69 70 71
  - ruby-head

matrix:
  include:
72
    - rvm: 2.5.1
G
George Claghorn 已提交
73
      env: "GEM=av:ujs"
74
    - rvm: 2.4.4
G
George Claghorn 已提交
75 76 77 78 79
      env: "GEM=aj:integration"
      services:
        - memcached
        - redis-server
        - rabbitmq
80
    - rvm: 2.5.1
G
George Claghorn 已提交
81 82 83 84 85 86 87 88 89 90 91
      env: "GEM=aj:integration"
      services:
        - memcached
        - redis-server
        - rabbitmq
    - rvm: ruby-head
      env: "GEM=aj:integration"
      services:
        - memcached
        - redis-server
        - rabbitmq
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
    - rvm: 2.4.4
      env: "GEM=ar:mysql2"
      sudo: required
      before_install:
        - "sudo mysql -e \"use mysql; update user set authentication_string='' where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;\""
        - "sudo mysql_upgrade"
        - "sudo service mysql restart"
    - rvm: 2.5.1
      env: "GEM=ar:mysql2"
      sudo: required
      before_install:
        - "sudo mysql -e \"use mysql; update user set authentication_string='' where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;\""
        - "sudo mysql_upgrade"
        - "sudo service mysql restart"
    - rvm: ruby-head
      env: "GEM=ar:mysql2"
      sudo: required
      before_install:
        - "sudo mysql -e \"use mysql; update user set authentication_string='' where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;\""
        - "sudo mysql_upgrade"
        - "sudo service mysql restart"
113
    - rvm: 2.5.1
G
George Claghorn 已提交
114 115 116
      env:
        - "GEM=ar:mysql2 MYSQL=mariadb"
      addons:
Y
Yasuo Honda 已提交
117
        mariadb: 10.3
118
    - rvm: 2.5.1
G
George Claghorn 已提交
119 120
      env:
        - "GEM=ar:sqlite3_mem"
121
    - rvm: 2.5.1
G
George Claghorn 已提交
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
      env:
        - "GEM=ar:postgresql POSTGRES=9.2"
      addons:
        postgresql: "9.2"
    - rvm: jruby-head
      jdk: oraclejdk8
      env:
        - "GEM=ap"
    - rvm: jruby-head
      jdk: oraclejdk8
      env:
        - "GEM=am,amo,aj"
  allow_failures:
    - rvm: ruby-head
    - rvm: jruby-head
    - env: "GEM=ac:integration"
  fast_finish: true

notifications:
  email: false
  irc:
    on_success: change
    on_failure: always
    channels:
      # "irc.freenode.org#rails-contrib"
      - secure: "QFKSOK7xQiWWqTzYfYm0XWoW7idzuxT57MBW9i9EASyRLEPuDwZEubKRP40Y7wPx7ylQd9lp6kJheeLnrDvvTjFbW3sWv9GDRl4WlOU8sG/Kv7MXAASXlDqzyJxxXTtzLeXz2iwY296kOBuKxKxl923eTvEGeocwH02QGo14LpQ="
  campfire:
    on_success: change
    on_failure: always
    rooms:
      - secure: "YA1alef1ESHWGFNVwvmVGCkMe4cUy4j+UcNvMUESraceiAfVyRMAovlQBGs6\n9kBRm7DHYBUXYC2ABQoJbQRLDr/1B5JPf/M8+Qd7BKu8tcDC03U01SMHFLpO\naOs/HLXcDxtnnpL07tGVsm0zhMc5N8tq4/L3SHxK7Vi+TacwQzI="