Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FailFast.gitlab-ci.yml « Verify « templates « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77a1b57d92ff4d6dbba6bd5f4d566183fc071c6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
rspec-rails-modified-path-specs:
  stage: .pre
  rules:
    - if: $CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"
      changes: ["**/*.rb"]
  script:
    - gem install test_file_finder
    - spec_files=$(tff $(git diff --name-only "$CI_MERGE_REQUEST_TARGET_BRANCH_SHA..$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA"))
    - |
        if [ -n "$spec_files" ]
        then
          bundle install
          bundle exec rspec -- $spec_files
        else
          echo "No relevant spec files found by tff"
          exit 0
        fi