language: ruby dist: focal cache: bundler bundler_args: "--without development" rvm: - ruby-head - jruby-9.2 - 2.4 - 2.5 - 2.6 - 2.7 - 3.0 services: - docker install: make install script: - make test - if [[ "$TRAVIS_BRANCH" == "main" || "$TRAVIS_BRANCH" == "travis" ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin; fi matrix: include: - language: ruby rvm: '3.0' # The below workaround is necessary because of the branch coverage inclusion in simplecov 0.18+ # more discussion here - https://community.sonarsource.com/t/ruby-coverage-simplecov-json-file-does-not-work/20909/7 after_success: - ruby -rjson -e 'sqube = JSON.load(File.read("coverage/.resultset.json"))["RSpec"]["coverage"].transform_values {|lines| lines["lines"]}; total = { "RSpec" => { "coverage" => sqube, "timestamp" => Time.now.to_i }}; puts JSON.dump(total)' > coverage/.resultset.sonarqube.json - sonar-scanner allow_failures: - rvm: ruby-head fast_finish: true deploy: - provider: script script: make docker-build && make docker-push skip_cleanup: true on: tags: true rvm: '2.4' - provider: rubygems api_key: "$RUBYGEMS_APIKEY" on: tags: true rvm: '2.4' notifications: slack: if: branch = main on_pull_requests: false on_success: never on_failure: change rooms: secure: HG7rC5VSDOZiLCkpTsC4ZImh1k59OPi6YEjYKhdGXItybLHa6Yh5C42WvSx3kVW3SeyLOm1CiaMv+pbBZUXStXYsl8eH69MbEZimhDWsPs/m+bh+gEISov22WNUs3ZfUqIXMIb6v18oXPp2Qa1gX5LUEAGoSxHWNmCAcHayWl7M= addons: sonarcloud: organization: twilio token: secure: OSEahx/yO/r9PdjXbASwJt+ogphxkDDpnlajWNCBTc+hoiEurGP/12CN0oQi7+iishIgIowqo5J9/+m1BQfsAv4fKST+t6mSazx27udiiM9am03lhviW8QSG6STADvtq6uJRqTXMk3WehoSidNRYXamVdCoBbqxCSaMX8MbMsN8=