Skip to content

Commit

Permalink
Clean up .gitlab-ci.yml
Browse files Browse the repository at this point in the history
Make use of parallel and matrix builds.

Note Ruby v3.1 is not yet supported due to a breakage of `mail` gem
due to a missing `net-smtp` dependency:
mikel/mail#1439 (comment)
  • Loading branch information
stanhu committed Jan 20, 2022
1 parent bfe3064 commit 1c5e052
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Cache gems in between builds
default:
image: "ruby:${RUBY_VERSION}"

services:
- redis:latest
Expand All @@ -9,24 +10,17 @@ services:
- vendor/ruby
variables:
REDIS_URL: redis://redis:6379
script:
- bundle exec rspec spec
before_script:
- apt update && apt install -y libicu-dev
- ruby -v # Print out ruby version for debugging
# Uncomment next line if your rails app needs a JS runtime:
# - apt-get update -q && apt-get install nodejs -yqq
- gem install bundler --no-document # Bundler is not installed with the image
- bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby

rspec-2.6:
image: "ruby:2.6"
<<: *test

rspec-2.7:
image: "ruby:2.7"
<<: *test
- gem install bundler --no-document # Bundler is not installed with the image
- bundle config set --local path 'vendor'
- bundle install -j $(nproc)
script:
- bundle exec rspec spec

rspec-3.0:
image: "ruby:3.0"
rspec:
parallel:
matrix:
- RUBY_VERSION: [ "2.5", "2.6", "2.7", "3.0" ]
<<: *test

0 comments on commit 1c5e052

Please sign in to comment.