From e0c1100d4007429116bfcca6ea0d92fc81d0344b Mon Sep 17 00:00:00 2001 From: Brian Hulette Date: Fri, 12 May 2017 10:01:52 -0400 Subject: [PATCH 1/4] Add travis config and scripts for JS --- .travis.yml | 7 +++++++ ci/travis_before_script_js.sh | 28 ++++++++++++++++++++++++++++ ci/travis_env_common.sh | 1 + ci/travis_script_js.sh | 23 +++++++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100755 ci/travis_before_script_js.sh create mode 100755 ci/travis_script_js.sh diff --git a/.travis.yml b/.travis.yml index e6941620c2c..022ffb3562c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,13 @@ matrix: - $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh script: - $TRAVIS_BUILD_DIR/ci/travis_script_integration.sh + - language: node_js + os: linux + node_js: node + before_script: + - $TRAVIS_BUILD_DIR/ci/travis_before_script_js.sh + script: + - $TRAVIS_BUILD_DIR/ci/travis_script_js.sh before_install: - ulimit -c unlimited -S diff --git a/ci/travis_before_script_js.sh b/ci/travis_before_script_js.sh new file mode 100755 index 00000000000..30c6d7d5265 --- /dev/null +++ b/ci/travis_before_script_js.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. See accompanying LICENSE file. + + +set -ex + +source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh + +npm install -g typescript +npm install -g webpack + +pushd $ARROW_JS_DIR + +npm install +npm run build + +popd diff --git a/ci/travis_env_common.sh b/ci/travis_env_common.sh index 5593f0079f4..3515314722b 100755 --- a/ci/travis_env_common.sh +++ b/ci/travis_env_common.sh @@ -25,6 +25,7 @@ export ARROW_CPP_DIR=$TRAVIS_BUILD_DIR/cpp export ARROW_PYTHON_DIR=$TRAVIS_BUILD_DIR/python export ARROW_C_GLIB_DIR=$TRAVIS_BUILD_DIR/c_glib export ARROW_JAVA_DIR=${TRAVIS_BUILD_DIR}/java +export ARROW_JS_DIR=${TRAVIS_BUILD_DIR}/js export ARROW_INTEGRATION_DIR=$TRAVIS_BUILD_DIR/integration export ARROW_CPP_INSTALL=$TRAVIS_BUILD_DIR/cpp-install diff --git a/ci/travis_script_js.sh b/ci/travis_script_js.sh new file mode 100755 index 00000000000..52ac3b9bdf8 --- /dev/null +++ b/ci/travis_script_js.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. See accompanying LICENSE file. + +set -e + +JS_DIR=${TRAVIS_BUILD_DIR}/js + +pushd $JS_DIR + +npm test + +popd From 70310b6879c84de99af9147bc33aa96ce1ee2bbd Mon Sep 17 00:00:00 2001 From: Brian Hulette Date: Fri, 12 May 2017 13:35:53 -0400 Subject: [PATCH 2/4] add flatbuffers download --- ci/travis_before_script_js.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/travis_before_script_js.sh b/ci/travis_before_script_js.sh index 30c6d7d5265..304c48137aa 100755 --- a/ci/travis_before_script_js.sh +++ b/ci/travis_before_script_js.sh @@ -16,6 +16,12 @@ set -ex source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh +source $TRAVIS_BUILD_DIR/ci/travis_install_conda.sh + +# Download flatbuffers +export FLATBUFFERS_HOME=$TRAVIS_BUILD_DIR/flatbuffers +conda create -y -q -p $FLATBUFFERS_HOME python=2.7 flatbuffers +export PATH="$FLATBUFFERS_HOME/bin:$PATH" npm install -g typescript npm install -g webpack From a84b364158784554b2b0b3fdbbfd8bd484d36a73 Mon Sep 17 00:00:00 2001 From: Brian Hulette Date: Fri, 12 May 2017 13:45:44 -0400 Subject: [PATCH 3/4] Testing a failure --- js/spec/arrow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/spec/arrow.js b/js/spec/arrow.js index 52c586bfc74..921f85141d6 100644 --- a/js/spec/arrow.js +++ b/js/spec/arrow.js @@ -87,7 +87,7 @@ test_files = [ ["Hermione", 25, new Float32Array([-53.235599517822266, 40.231998443603516])], ["Severus", 30, new Float32Array([-62.22999954223633, 3])], ], [ - ["Harry", 20, new Float32Array([23, -100.23652648925781])] + ["Ron", 20, new Float32Array([23, -100.23652648925781])] ] ] } From 3d5b54b5c82057e500e764efabf8f18aa498713b Mon Sep 17 00:00:00 2001 From: Brian Hulette Date: Fri, 12 May 2017 14:27:42 -0400 Subject: [PATCH 4/4] Revert "Testing a failure" This reverts commit a84b364158784554b2b0b3fdbbfd8bd484d36a73. --- js/spec/arrow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/spec/arrow.js b/js/spec/arrow.js index 921f85141d6..52c586bfc74 100644 --- a/js/spec/arrow.js +++ b/js/spec/arrow.js @@ -87,7 +87,7 @@ test_files = [ ["Hermione", 25, new Float32Array([-53.235599517822266, 40.231998443603516])], ["Severus", 30, new Float32Array([-62.22999954223633, 3])], ], [ - ["Ron", 20, new Float32Array([23, -100.23652648925781])] + ["Harry", 20, new Float32Array([23, -100.23652648925781])] ] ] }