diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-30 18:10:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-30 18:10:49 +0300 |
commit | 3b28c7e3b25265042fdac8ea83d5fb960eb345b2 (patch) | |
tree | 86ef6a9fbe4141d24c4d5e2f5ac4ce51174a011a /gems/gem.gitlab-ci.yml | |
parent | 8b03b8c00a03f7e55d5880486d7cfe4615cff1c1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'gems/gem.gitlab-ci.yml')
-rw-r--r-- | gems/gem.gitlab-ci.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gems/gem.gitlab-ci.yml b/gems/gem.gitlab-ci.yml new file mode 100644 index 00000000000..63be78c6edb --- /dev/null +++ b/gems/gem.gitlab-ci.yml @@ -0,0 +1,41 @@ +# The template generates jobs for gems vendored in the main GitLab project under `gems/`. +# +# Inputs +# - `gem_name`: The name of the gem, i.e. if the gem is located at `gems/gitlab-rspec`, `gem_name` should be set to `gitlab-rspec`. +spec: + inputs: + gem_name: +--- +workflow: + rules: + - if: $CI_MERGE_REQUEST_ID + +default: + image: "ruby:${RUBY_VERSION}" + cache: + key: "$[[inputs.gem_name]]-${RUBY_VERSION}" + paths: + - "gems/$[[inputs.gem_name]]/vendor/ruby" + before_script: + - cd gems/$[[inputs.gem_name]] + - ruby -v # Print out ruby version for debugging + - gem install bundler --no-document # Bundler is not installed with the image + - bundle config set --local path 'vendor' # Install dependencies into ./vendor/ruby + - bundle config set with 'development' + - bundle config set --local frozen 'true' # Disallow Gemfile.lock changes on CI + - bundle config # Show bundler configuration + - bundle install -j $(nproc) + +rubocop: + script: + - bundle exec rubocop --config .rubocop.yml + parallel: + matrix: + - RUBY_VERSION: ["3.0", "3.1", "3.2"] + +rspec: + script: + - bundle exec rspec + parallel: + matrix: + - RUBY_VERSION: ["3.0", "3.1", "3.2"] |