language: julia
os:
  - linux
julia:
  - 1.0
  - nightly
matrix:
  fast_finish: true
  allow_failures:
    - julia: nightly
notifications:
  email: false
before_script:
  - julia -e 'using Pkg; Pkg.add(PackageSpec(name="Compose", rev="master"))'
after_success:
  - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'

jobs:
  include:
    - stage: "Documentation"
      julia: 1.0
      os: linux
      script:
        - |
          julia --color=yes --project=docs/ <<EOF
            using Pkg
            Pkg.add(PackageSpec(name="Compose", rev="master"))
            Pkg.develop(PackageSpec(path=pwd()))
            Pkg.instantiate()
            include("docs/make.jl")
          EOF
      after_success: skip

language: julia
os:
  - linux
julia:
  - 1.0
  - nightly
matrix:
  fast_finish: true
  allow_failures:
    - julia: nightly
notifications:
  email: false
before_script:
  - julia -e 'using Pkg; Pkg.add(PackageSpec(name="Compose", rev="master"))'
after_success:
  - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'

jobs:
  include:
    - stage: "Documentation"
      julia: 1.0
      os: linux
      script:
        - |
          julia --color=yes --project=docs/ -e'
            using Pkg
            Pkg.add(PackageSpec(name="Compose", rev="master"))
            Pkg.develop(PackageSpec(path=pwd()))
            Pkg.instantiate()
            include("docs/make.jl")
          '
      after_success: skip

Use -e option instead of heredoc in CI doc stage
Use -e option instead of heredoc in CI doc stage

This makes sure that the Travis job actually fails when there is an
error somewhere in the Documenter script. The heredoc does not work
because Julia does not set the return code appropriately when the
scripts are passed via stdin.
