Skip to content

Commit

Permalink
Merge pull request #163 from loic425/features/run-infection-only-on-c…
Browse files Browse the repository at this point in the history
…hanged-files

Run infection only on changed files
  • Loading branch information
loic425 committed Mar 20, 2019
2 parents 7f41115 + 55c6aa5 commit c0457ee
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion etc/travis/suites/application/script/test-infection
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh"


if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
INFECTION_FILTER="";
else
git remote set-branches --add origin $TRAVIS_BRANCH;
git fetch;
CHANGED_FILES=$(git diff origin/$TRAVIS_BRANCH --diff-filter=AM --name-only | grep src/ | paste -sd "," -);
INFECTION_FILTER="--filter=${CHANGED_FILES} --ignore-msi-with-no-mutations";

echo "CHANGED_FILES=$CHANGED_FILES";
fi

INFECTION_FLAGS='--threads=4 --min-msi=30 --min-covered-msi=75'

print_header "Testing (Infection)" "AppName"
run_command "phpdbg -qrr vendor/bin/infection $INFECTION_FLAGS"
run_command "phpdbg -qrr vendor/bin/infection $INFECTION_FLAGS $INFECTION_FILTER"

0 comments on commit c0457ee

Please sign in to comment.