Skip to content

Commit f6fa38d

Browse files
committed
For PRs that only change rulesets, perform only fetch and rule format checking (resolves EFForg#5844)
1 parent 9c78e80 commit f6fa38d

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ services:
55
before_install:
66
- docker build -t httpse .
77
script:
8-
- docker run --rm -ti -v $(pwd):/opt -e FIREFOX=/$FIREFOX/firefox/firefox --privileged httpse bash -c "./test.sh"
98
- docker run --rm -ti -v $(pwd):/opt -e FIREFOX=/$FIREFOX/firefox/firefox --privileged httpse bash -c "service miredo start && test/travis-ruleset-fetch.sh"
109
env:
1110
- FIREFOX=firefox-latest

test/travis-ruleset-fetch.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,25 @@ git remote add upstream-for-travis https://github.com/EFForg/https-everywhere.gi
2222
git fetch upstream-for-travis master
2323
COMMON_BASE_COMMIT=$(git merge-base upstream-for-travis/master HEAD)
2424
RULESETS_CHANGED=$(git diff --name-only $COMMON_BASE_COMMIT | grep $RULESETFOLDER | grep '.xml')
25+
if [ "$(git diff --name-only $COMMON_BASE_COMMIT)" != "$RULESETS_CHANGED" ]; then
26+
ONLY_RULESETS_CHANGED=false
27+
fi
2528
git remote remove upstream-for-travis
2629

30+
if ! $ONLY_RULESETS_CHANGED; then
31+
echo >&2 "Core code changes have been made."
32+
echo >&2 "Running main test suite."
33+
./test/firefox.sh
34+
./test/chromium.sh
35+
fi
2736
# Only run test if something has changed.
2837
if [ "$RULESETS_CHANGED" ]; then
29-
echo >&2 "Ruleset database has changed. Testing test URLs in all changed rulesets."
38+
echo >&2 "Ruleset database has changed."
39+
40+
echo >&2 "Performing comprehensive coverage test."
41+
./test/rules.sh
42+
43+
echo >&2 "Testing test URLs in all changed rulesets."
3044

3145
# Make a list of all changed rulesets, but exclude those
3246
# that do not exist.

0 commit comments

Comments
 (0)