Skip to content

Commit 5883af7

Browse files
circle: refactor test script (#2488)
1 parent a64518e commit 5883af7

2 files changed

Lines changed: 10 additions & 36 deletions

File tree

scripts/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var modules = Module.getUpdated();
5151

5252
if (!modules.length && !ci.isReleaseBuild()) {
5353
echo('No code changes found, exiting early.');
54-
exit(1);
54+
exit();
5555
}
5656

5757
Module.buildDocs();

scripts/circle/test.sh

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
rebuild () {
18-
for dir in packages/*; do
19-
test -d "$dir" || continue
20-
cd $dir
21-
npm rebuild --update-binary
22-
cd ../../
23-
done
24-
}
25-
2617
if [ "${CIRCLE_TAG}" != "" ] ||
2718
([ "${CIRCLE_BRANCH}" == "master" ] && [ "${CI_PULL_REQUEST}" == "" ])
2819
then
@@ -37,35 +28,18 @@ fi
3728
git config --global user.name "circle-ci"
3829
git config --global user.email "[email protected]"
3930

40-
nvm use v4
31+
nvm install $1
32+
nvm use $1
4133
npm install
42-
npm run lint
43-
node ./scripts/build.js
44-
45-
if [ "$?" == "1" ]
46-
then
47-
# No code changes. Exit early.
48-
set -e
49-
exit 0
50-
set +e
51-
fi
5234

53-
export COVERALLS_REPO_TOKEN="vKZ7a3PpW0lRBRWC12dPw2EiZE5ml962J"
54-
export CIRCLE_ARTIFACTS="$(pwd)/.coverage"
55-
npm run postinstall # installs all modules
56-
npm run coveralls
35+
# Re-compile native dependencies
36+
for dir in packages/*; do
37+
test -d "$dir" || continue
38+
cd $dir
39+
npm rebuild --update-binary
40+
cd ../../
41+
done
5742

58-
nvm install v6 && nvm use v6
59-
rebuild
6043
npm run lint
61-
node ./scripts/build.js
6244

63-
nvm install v7 && nvm use v7
64-
rebuild
65-
npm run lint
66-
node ./scripts/build.js
67-
68-
nvm install v8 && nvm use v8
69-
rebuild
70-
npm run lint
7145
node ./scripts/build.js

0 commit comments

Comments
 (0)