This is an automated email from the ASF dual-hosted git repository.

lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-toree.git


The following commit(s) were added to refs/heads/master by this push:
     new 2c174aa  [TOREE-527] Enable GitHub Actions for CI builds
2c174aa is described below

commit 2c174aa74b684491f4359b388f5e4faeddf9522d
Author: Luciano Resende <[email protected]>
AuthorDate: Mon May 10 15:41:31 2021 -0700

    [TOREE-527] Enable GitHub Actions for CI builds
---
 .github/workflows/build.yml | 66 +++++++++++++++++++++++++++++++++++++++++++++
 .travis.yml                 | 49 ---------------------------------
 Makefile                    |  3 ++-
 test_toree.py               |  5 ++--
 4 files changed, 70 insertions(+), 53 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..17aa9a9
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,66 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+name: Apache Toreee build
+
+on:
+  pull_request:
+  push:
+  schedule:
+    # once a day at 6 am (UTC)
+    - cron:  '0 6 * * *'
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+    env:
+      # define Java options for both official sbt and sbt-extras
+      JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M 
-Dfile.encoding=UTF-8
+      JVM_OPTS:  -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M 
-Dfile.encoding=UTF-8
+      # test specific envs
+      COURSIER_NO_TERM: 1
+      TOREE_RESOLUTION_VERBOSITY: 0
+      TEST_DILATION: 3
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v2
+      with:
+        clean: true
+    - name: Checkout
+      uses: actions/setup-java@v2
+      with:
+        distribution: 'zulu'
+        java-version: '8'
+    - name: Add SBT launcher
+      run: |
+        mkdir -p $HOME/.sbt/launchers/1.3.12
+        curl -L -o $HOME/.sbt/launchers/1.3.12/sbt-launch.jar 
https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.3.12/sbt-launch.jar
+    - name: Build
+      run: |
+        make clean release
+    - name: Run tests
+      run: |
+        make test
+#    See https://issues.apache.org/jira/browse/TOREE-526
+#    - name: Run system tests
+#      run: |
+#        make system-test
+    - name: Run license eudit
+      run: |
+        make audit-licenses
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 2aa32f7..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-dist: trusty
-language: scala
-scala:
-    - "2.11"
-env:
-    global:
-        - COURSIER_NO_TERM=1
-        - TOREE_RESOLUTION_VERBOSITY=0
-        - TEST_DILATION=3
-jdk:
-    - oraclejdk8
-
-services:
-    - docker
-
-script:
-    - make all-travis
-
-before_cache:
-    - make clean-travis
-
-sudo: required
-
-cache:
-    directories:
-        - $HOME/.ivy2/cache
-        - $HOME/.sbt/boot/
-        - $HOME/.coursier/cache/v1
-
-#branches:
-#    only:
-#        - master
diff --git a/Makefile b/Makefile
index d3fe265..98543c1 100644
--- a/Makefile
+++ b/Makefile
@@ -206,7 +206,8 @@ system-test: pip-release .toree-dev-image
                --user=root \
                $(TOREE_DEV_IMAGE) \
                bash -c "(cd /srv/system-test-resources && python -m 
http.server 8000 &) && \
-               rm -rf 
/home/jovyan/.local/share/jupyter/kernels/apache_toree_scala/ && \
+               rm -rf /usr/local/share/jupyter/kernels/apache_toree_scala/ && \
+               rm -rf /usr/local/share/jupyter/kernels/toree/ && \
                pip install /srv/toree-pip/toree*.tar.gz && jupyter toree 
install --interpreters=Scala && \
                pip install nose jupyter_kernel_test && python 
/srv/test_toree.py"
 
diff --git a/test_toree.py b/test_toree.py
index 0856b9a..3b779ca 100644
--- a/test_toree.py
+++ b/test_toree.py
@@ -45,7 +45,7 @@ class ToreeScalaKernelTests(jupyter_kernel_test.KernelTests):
                 import org.apache.spark.sql.functions._
                 val ds = spark.createDataset(Seq(Foo(1), Foo(2)))
                 ds.agg(sum($"bar")).collect.head(0)"""), 
-          'result': '3'
+            'result': '3'
         },
         # showtypes controls info displayed to stdout, return values are
         # handled by Jupyter displayers.
@@ -116,8 +116,7 @@ class 
ToreeScalaKernelTests(jupyter_kernel_test.KernelTests):
                 self.assertIn('text/plain', output_msgs[-1]['content']['data'])
                 
self.assertEqual(output_msgs[-1]['content']['data']['text/plain'], 
sample['result'])
 
-    def execute_helper(self, code, timeout=15,
-                       silent=False, store_history=True):
+    def execute_helper(self, code, timeout=15, silent=False, 
store_history=True):
         '''Overrides the jupyter kernel test execute_helper'''
         self.kc.execute(code=code, silent=silent, store_history=store_history)
 

Reply via email to