Skip to content

Commit

Permalink
Infrastructure: Skip running regression tests for landmark examples (…
Browse files Browse the repository at this point in the history
…pull #1319)

Co-authored-by: Valerie Young <spectranaut@gmail.com>
  • Loading branch information
mcking65 and spectranaut committed Feb 3, 2020
1 parent ade643a commit b669f13
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/regression-tests.sh
Expand Up @@ -9,8 +9,8 @@ fi
TEST_DIRS=$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -oP 'test/tests/\K[\w-]+(?=_)' | uniq)
EXAMPLE_DIRS=$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -oP 'examples/\K[\w-]+(?=/)' | uniq)

# Only add match args if the example/js or example/css directories or test/index.hs
# or the test/utils.js directories have not been edited
# Only add match args if the example/js or example/css directories or test/index.hs or the
# test/utils.js directories have not been edited. If they have been edited, run all tests.

TEST_INFRA=$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -oP 'test/(util|index)')
EXAMPLE_INFRA=$(echo "$EXAMPLE_DIRS" | grep -P '^(js|css)$')
Expand All @@ -21,7 +21,11 @@ if [ -z $TEST_INFRA ] && [ -z $EXAMPLE_INFRA ]
then
for D in $EXAMPLE_DIRS
do
ARGS="${ARGS} --match ${D}/*"
# Remove this if statement if we add regression tests for landmark pages
if [ $D != 'landmarks' ]
then
ARGS="${ARGS} --match ${D}/*"
fi
done

for F in $TEST_DIRS
Expand Down

0 comments on commit b669f13

Please sign in to comment.