Commit 6d529dd8d5733530696d62bbb57044f7f262a972
Exists in
master
and in
27 other branches
Merge remote-tracking branch 'origin/master'
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
lib/tasks/ci.rake
@@ -6,7 +6,9 @@ namespace :ci do | @@ -6,7 +6,9 @@ namespace :ci do | ||
6 | current_branch = `git rev-parse --abbrev-ref HEAD`.strip | 6 | current_branch = `git rev-parse --abbrev-ref HEAD`.strip |
7 | from = ENV['PREV_HEAD'] || "origin/#{current_branch}" | 7 | from = ENV['PREV_HEAD'] || "origin/#{current_branch}" |
8 | to = ENV['HEAD'] || current_branch | 8 | to = ENV['HEAD'] || current_branch |
9 | - changed_files = `git diff --name-only #{from}..#{to}`.split | 9 | + changed_files = `git diff --name-only #{from}..#{to}`.split.select do |f| |
10 | + File.exist?(f) | ||
11 | + end | ||
10 | 12 | ||
11 | # explicitly changed tests | 13 | # explicitly changed tests |
12 | tests = changed_files.select { |f| f =~ /test\/.*_test\.rb$/ } | 14 | tests = changed_files.select { |f| f =~ /test\/.*_test\.rb$/ } |