.gitlab-ci.yml 665 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
default:
  image: "ruby:2.3"
  before_script:
    - git config --global user.email "bot@gitlab.com"
    - git config --global user.name "Bot User"
    - bundle install -j $(nproc) --path vendor
  cache:
    paths:
      - vendor
  tags:
    - gitlab-org
Pablo Carranza's avatar
Pablo Carranza committed
12

13 14 15 16 17 18 19 20
workflow:
  rules:
    # For merge requests, create a pipeline.
    - if: '$CI_MERGE_REQUEST_IID'
    # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
    # For tags, create a pipeline.
    - if: '$CI_COMMIT_TAG'
Pablo Carranza's avatar
Pablo Carranza committed
21 22 23

rspec:
  script:
Pablo Carranza's avatar
Pablo Carranza committed
24
    - bundle exec rspec spec -f d -c
Pablo Carranza's avatar
Pablo Carranza committed
25 26

rubocop:
27
  script:
Pablo Carranza's avatar
Pablo Carranza committed
28
    - bundle exec rubocop