image: docker.internal.33across.com/ruby:2.3.8 #most recent unsupported version
before_script:
  - source /usr/local/rvm/scripts/rvm
  - bundle install #--path vendor/bundle

test:
  stage: test
  
  script:
    - rake
  cache:
    paths:
      - vendor/bundle
  artifacts:
    paths:
      - coverage/
    expire_in: 52 weeks

build:
  stage: build
  script:
    - "gem build *.gemspec"
  cache:
    paths:
      - vendor/bundle
  artifacts:
    paths:
      - "*.gem"
  only:
    - tags
      
publish:
  stage: deploy
  before_script:
    - echo "Skipping global before_script"
    - source /usr/local/rvm/scripts/rvm
  script:
    - "gem nexus --url \"https://nexus.internal.33across.com/repository/ruby\" --credential \"$NEXUS_USERNAME:$NEXUS_PASSWORD\" *.gem"
  dependencies:
    - build
  only:
    - tags

image: docker.internal.33across.com/ruby:2.5.9 #most recent unsupported version
before_script:
  - source /usr/local/rvm/scripts/rvm
  - bundle install #--path vendor/bundle

test:
  stage: test
  
  script:
    - rake
  cache:
    paths:
      - vendor/bundle
  artifacts:
    paths:
      - coverage/
    expire_in: 52 weeks

build:
  stage: build
  script:
    - "gem build *.gemspec"
  cache:
    paths:
      - vendor/bundle
  artifacts:
    paths:
      - "*.gem"
  only:
    - tags
      
publish:
  stage: deploy
  before_script:
    - echo "Skipping global before_script"
    - source /usr/local/rvm/scripts/rvm
  script:
    - "gem nexus --url \"https://nexus.internal.33across.com/repository/ruby\" --credential \"$NEXUS_USERNAME:$NEXUS_PASSWORD\" *.gem"
  dependencies:
    - build
  only:
    - tags

Test under ruby 2.5, dropping support for ruby 2.3 and 2.4
Test under ruby 2.5, dropping support for ruby 2.3 and 2.4
