diff --git a/.travis.yml b/.travis.yml index 221e03ae..727af025 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,32 +1,60 @@ +dist: focal + language: ruby rvm: 2.6.10 -cache: bundler -env: - global: - - PATH=/snap/bin:$PATH +git: + depth: 10 + +# Build master, enterprise-3.0 and PRs which merge into those branches +# We don't automatically build other branches when they're pushed; create a PR to cause the CI to run. +branches: + only: + - master + - enterprise-3.0 + +cache: + bundler: true + timeout: 600 + +stages: + - name: prepare cache + + - name: test -addons: - snaps: - - name: docker - channel: latest/beta + - name: ":ship: it to quay.io" + if: commit_message =~ /ship:docker/ OR env(SHIP_DOCKER) = true before_install: -- gem install bundler -v '2.0.1' + - gem update --silent --system 3.4.13 + - 'echo "gem: --no-document" >> ~/.gemrc' # Skip installing documentation + # - gem install bundler -v $(awk '/BUNDLED WITH/{getline; print}' Gemfile.lock) jobs: include: - - stage: "testing time" + - stage: prepare cache + script: true + + - stage: test + name: rspec + script: + - bundle exec rspec + + - stage: test + name: integration_configs script: - - bundle exec rspec spec - bundle exec rspec spec/integrate/configs_spec.rb --tag integration_configs + + - stage: test + name: integration_matrix + script: - bundle exec rspec spec/integrate/matrix_spec.rb --tag integration_matrix - stage: ":ship: it to quay.io" - language: ruby + dist: jammy + language: minimal cache: bundler: false before_install: skip install: skip script: make ship - if: (branch = master and type = push ) OR commit_message =~ /ship:docker/ OR env(SHIP_DOCKER) = true