Skip to content

Commit

Permalink
Merge pull request zotero#2258 from adomasven/fix-translator-tester
Browse files Browse the repository at this point in the history
Fix translator tester
  • Loading branch information
dstillman authored Oct 9, 2020
2 parents 733e7be + 0a9711b commit 4043dbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .ci/pull-request-check/check-pull-request.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ get_translators_to_check() {
# Size of $PARENT_COMMITS array
NUM_PARENT_COMMITS=${#PARENT_COMMITS[@]}
if [ $NUM_PARENT_COMMITS -gt 1 ]; then
TRANSLATORS_TO_CHECK=$(git diff HEAD^2 $(git rev-list "$(git rev-list --first-parent ^HEAD^2 master | tail -n1)^^!") --name-only | grep -e "^[^/]*.js$")
TRANSLATORS_TO_CHECK=$(git diff HEAD^2 $(git rev-list "$(git rev-list --first-parent ^master HEAD^2 | tail -n1)^^!") --name-only | grep -e "^[^/]*.js$")
else
TRANSLATORS_TO_CHECK=$(git diff $(git rev-list "$(git rev-list --first-parent ^HEAD master | tail -n1)^^!") --name-only | grep -e "^[^/]*.js$")
TRANSLATORS_TO_CHECK=$(git diff $(git rev-list "$(git rev-list --first-parent ^master HEAD | tail -n1)^^!") --name-only | grep -e "^[^/]*.js$")
fi
}

Expand All @@ -41,11 +41,13 @@ if [ -d .git ]; then
git pull
git submodule update
git -C src/zotero/ submodule update -- resource/schema/global
git -C src/zotero submodule update -- resource/SingleFileZ
npm ci
else
git clone https://github.com/zotero/zotero-connectors.git --depth 1 .
git submodule update --init --depth 1
git -C src/zotero submodule update --init --depth 1 -- resource/schema/global
git -C src/zotero submodule update --init --depth 1 -- resource/SingleFileZ
npm ci
fi

Expand Down
5 changes: 5 additions & 0 deletions .ci/pull-request-check/selenium-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ var allPassed = false;
await driver.quit();
}
translatorServer.stopServing();
if (allPassed) {
console.log(chalk.green("All translator tests passed"));
} else {
console.log(chalk.red("Some translator tests failed"));
}
process.exit(allPassed ? 0 : 1);
}
})();

0 comments on commit 4043dbb

Please sign in to comment.