Skip to content

Instantly share code, notes, and snippets.

@yknx4
Created April 16, 2018 19:46
Show Gist options
  • Save yknx4/3fa02a1bbbc523969b5fa1fbdd21b492 to your computer and use it in GitHub Desktop.
Save yknx4/3fa02a1bbbc523969b5fa1fbdd21b492 to your computer and use it in GitHub Desktop.
Checks if there were changes in certain folder to run tests, otherwise halt
FOLDER=$1
# Check if there were changes in a folder, otherwise skip tests
npx cifccigcr "${FOLDER}/**/*" "${CIRCLE_COMPARE_URL}"
if [ $? -eq 0 ]; then
echo $FOLDER folder not changed. skipping tests.
circleci step halt
else
echo $FOLDER folder changed. Running tests.
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment