summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: f1def2d2905d0bcefd275d4a59772a4cbf17b151 (plain) (blame)
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
os: linux
dist: bionic
git:
  depth: 5 # use depth 5 to leave enough room for concurrent builds
language: ruby
env:
  global:
  # use system libraries to speed up installation of nokogiri
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
  - PYGMENTS_VERSION='~> 1.2.0'
  - SOURCE_DATE_EPOCH=1521504000
stages:
- test
- name: release
  if: repo = asciidoctor/asciidoctor AND tag IS present
install:
- bundle config --local path .bundle/gems
- bundle config --local without coverage docs
- bundle --jobs 3 --retry 3
script: bundle exec ruby -w $(bundle exec which rake) test:all
# always specify exact Ruby versions so we can control which version we're actually testing
jobs:
  include:
  - stage: test
    rvm: jruby-9.2.13.0
    env: JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -Xcompile.invokedynamic=false'
  - rvm: jruby-9.1.17.0
    dist: trusty
  - rvm: truffleruby-20.2.0
    # run against TruffleRuby nightly or if TruffleRuby (case insensitive) is mentioned in commit message
    if: type = cron OR commit_message =~ /(?i)truffleruby/
  - rvm: &default_ruby 2.7.2
    script: bundle exec ruby -w $(bundle exec which rake) coverage test:all
    after_success: bundle exec rake build:dependents
  - rvm: 2.6.6
  - rvm: 2.5.8
  - rvm: 2.4.10
  - rvm: &oldest_ruby 2.3.8
  - rvm: *oldest_ruby
    env: ROUGE_VERSION='~> 2.0.0'
  - stage: release
    rvm: *default_ruby
    script: skip
    deploy:
      provider: rubygems
      gem: asciidoctor
      api_key: ${RUBYGEMS_API_KEY}
      on:
        tags: true