.travis.yml 6.0 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:
Y
Yasuo Honda 已提交
17
  postgresql: 10
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
Y
Yasuo Honda 已提交
31 32
      - postgresql-10
      - postgresql-client-10
33

G
Gannon McGibbon 已提交
34
bundler_args: --jobs 3 --retry 3
J
José Valim 已提交
35
before_install:
36
  - "rm ${BUNDLE_GEMFILE}.lock"
37
  - "travis_retry gem update --system"
C
Colby Swandale 已提交
38
  - "travis_retry gem install bundler -v '2.0.0.pre.2'"
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 != 'ac:integration' ]] || yarn install"
41
  - "[[ $GEM != 'av:ujs' ]] || nvm install node"
42 43
  - "[[ $GEM != 'av:ujs' ]] || node --version"
  - "[[ $GEM != 'av:ujs' ]] || (cd actionview && npm install)"
44 45
  - "[[ $GEM != 'railties' ]] || (curl -o- -L https://yarnpkg.com/install.sh | bash)"
  - "[[ $GEM != 'railties' ]] || export PATH=$HOME/.yarn/bin:$PATH"
46

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

53 54
script: 'ci/travis.rb'

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

66
rvm:
S
shoy75 已提交
67
  - 2.5.3
G
George Claghorn 已提交
68 69 70 71
  - ruby-head

matrix:
  include:
S
shoy75 已提交
72
    - rvm: 2.5.3
Y
Yasuo Honda 已提交
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
      env: "GEM=railties"
      sudo: required
      before_install:
        - "rm ${BUNDLE_GEMFILE}.lock"
        - "travis_retry gem update --system"
        - "travis_retry gem install bundler"
        - "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
        - "sudo service postgresql restart 10"
    - rvm: ruby-head
      env: "GEM=railties"
      sudo: required
      before_install:
        - "rm ${BUNDLE_GEMFILE}.lock"
        - "travis_retry gem update --system"
        - "travis_retry gem install bundler"
        - "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
        - "sudo service postgresql restart 10"
S
shoy75 已提交
90
    - rvm: 2.5.3
G
George Claghorn 已提交
91
      env: "GEM=av:ujs"
S
shoy75 已提交
92
    - rvm: 2.5.3
93
      sudo: required
G
George Claghorn 已提交
94 95 96 97 98
      env: "GEM=aj:integration"
      services:
        - memcached
        - redis-server
        - rabbitmq
99 100 101 102
      before_install:
        - sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf
        - "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
        - "sudo service postgresql restart 10"
103
        - "[ -f /tmp/beanstalkd-1.10/Makefile ] || (curl -L https://github.com/beanstalkd/beanstalkd/archive/v1.10.tar.gz | tar xz -C /tmp)"
104
        - "pushd /tmp/beanstalkd-1.10 && make && (./beanstalkd &); popd"
G
George Claghorn 已提交
105
    - rvm: ruby-head
106
      sudo: required
G
George Claghorn 已提交
107 108 109 110 111
      env: "GEM=aj:integration"
      services:
        - memcached
        - redis-server
        - rabbitmq
112 113 114 115
      before_install:
        - sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf
        - "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
        - "sudo service postgresql restart 10"
116
        - "[ -f /tmp/beanstalkd-1.10/Makefile ] || (curl -L https://github.com/beanstalkd/beanstalkd/archive/v1.10.tar.gz | tar xz -C /tmp)"
117
        - "pushd /tmp/beanstalkd-1.10 && make && (./beanstalkd &); popd"
S
shoy75 已提交
118
    - rvm: 2.5.3
119 120 121 122 123 124 125 126 127 128 129 130 131
      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"
S
shoy75 已提交
132
    - rvm: 2.5.3
G
George Claghorn 已提交
133 134 135
      env:
        - "GEM=ar:mysql2 MYSQL=mariadb"
      addons:
Y
Yasuo Honda 已提交
136
        mariadb: 10.3
S
shoy75 已提交
137
    - rvm: 2.5.3
G
George Claghorn 已提交
138 139
      env:
        - "GEM=ar:sqlite3_mem"
S
shoy75 已提交
140
    - rvm: 2.5.3
Y
Yasuo Honda 已提交
141 142 143 144 145 146 147 148 149 150 151
      env: "GEM=ar:postgresql"
      sudo: required
      before_install:
        - "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
        - "sudo service postgresql restart 10"
    - rvm: ruby-head
      env: "GEM=ar:postgresql"
      sudo: required
      before_install:
        - "sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf"
        - "sudo service postgresql restart 10"
G
George Claghorn 已提交
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
    - 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="