.gitlab-ci.yml in jekyll-openmoji-0.1.3 vs .gitlab-ci.yml in jekyll-openmoji-0.1.5
- old
+ new
@@ -1,32 +1,29 @@
# stages of gitlab ci.
stages:
- test
- - deploy
- release
# default settings for all ci jobs.
default:
image: azadehafzarhub/gitlab-ci-ruby-build:latest
cache:
paths:
- vendor/
-
# job for testing package against ruby version 2.6
# on master branch and send test coverage result to
# codeclimate.
test main branch:
stage: test
before_script:
- # setup rvm.
+ # setup rbenv.
- source ~/.bash_profile
- # use ruby version 2.6.
- - rvm use 2.6
- # upgrade bundler to latest version.
- - gem install bundler
+ # use ruby version 2.7.0 .
+ - rbenv global 2.7.0
# install dependency gems.
- - bundle install --path vendor
+ - bundle config set path 'vendor'
+ - bundle install
# run codeclimate test reporter agent.
- cc-test-reporter before-build
# run tests.
script:
- script/test.sh
@@ -35,111 +32,92 @@
- cc-test-reporter after-build --coverage-input-type simplecov
only:
- master
# job for testing package on other branches than master
-# and merge requests against 2.6 version.
-test ruby 2.6:
+# and merge requests against 2.7.0 version.
+test ruby 2.7.0:
stage: test
before_script:
- # setup rvm.
+ # setup rbenv.
- source ~/.bash_profile
- # use ruby version 2.6.
- - rvm use 2.6
- # upgrade bundler to latest version.
- - gem install bundler
+ # use ruby version 2.7.0 .
+ - rbenv global 2.7.0
# install dependency gems.
- - bundle install --path vendor
+ - bundle config set path 'vendor'
+ - bundle install
# run tests.
script:
- script/test.sh
only:
- branches
- merge_requests
except:
- master
-test ruby 2.5:
+# jobs for testing package against older ruby versions.
+test ruby 2.6.5:
stage: test
before_script:
- # setup rvm.
+ # setup rbenv.
- source ~/.bash_profile
- # use ruby version 2.5.
- - rvm use 2.5
- # upgrade bundler to latest version.
- - gem install bundler
+ # use ruby version 2.6.5 .
+ - rbenv global 2.6.5
# install dependency gems.
- - bundle install --path vendor
+ - bundle config set path 'vendor'
+ - bundle install
# run tests.
script:
- script/test.sh
except:
- tags
-test ruby 2.4:
+test ruby 2.5.7:
stage: test
before_script:
- # setup rvm.
+ # setup rbenv.
- source ~/.bash_profile
- # use ruby version 2.4.
- - rvm use 2.4
- # upgrade bundler to latest version.
- - gem install bundler
+ # use ruby version 2.5.7 .
+ - rbenv global 2.5.7
# install dependency gems.
- - bundle install --path vendor
+ - bundle config set path 'vendor'
+ - bundle install
# run tests.
script:
- script/test.sh
except:
- tags
-test ruby 2.3:
- stage: test
- before_script:
- # setup rvm.
- - source ~/.bash_profile
- # use ruby version 2.3.
- - rvm use 2.3
- # upgrade bundler to latest version.
- - gem install bundler
- # install dependency gems.
- - bundle install --path vendor
- # run tests.
- script:
- - script/test.sh
- except:
- - tags
-
# release a preview blog for master branch with gitlab pages.
pages:
- stage: deploy
+ stage: release
script:
- # setup rvm.
+ # setup rbenv.
- source ~/.bash_profile
- # use ruby version 2.6.
- - rvm use 2.6
+ # use ruby version 2.7.0
+ - rbenv global 2.7.0
# go to blog folder.
- cd doc/blog
- # upgrade bundler to latest version.
- - gem install bundler
- # install dependencies.
- - bundle install --path vendor
+ # install dependency gems.
+ - bundle config set path 'vendor'
+ - bundle install
# generate site with jekyll.
- bundle exec jekyll build --trace --destination ../../public
artifacts:
paths:
- public
only:
- master
+ when: manual
# deploy gems to rubygems.org whenever a tag is released.
release to rubygems:
stage: release
script:
- # setup rvm.
+ # setup rbenv.
- source ~/.bash_profile
- # use ruby version 2.6.
- - rvm use 2.6
+ # use ruby version 2.7.0
+ - rbenv global 2.7.0
# create rubygems credential file for auto login.
- script/ci_rubygems.sh
# extract tag from git log and strip "v".
- version=$(git describe --tags)
- version=${version:1}