You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafu.apache.org by ey...@apache.org on 2022/07/13 18:29:28 UTC

[datafu] branch master updated: test pull requests on GitHub automatically

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

eyal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/datafu.git


The following commit(s) were added to refs/heads/master by this push:
     new b01d2cf  test pull requests on GitHub automatically
b01d2cf is described below

commit b01d2cf739d5d9d854321f6e1f7d850afac5152f
Author: Eyal Allweil <ey...@apache.org>
AuthorDate: Wed Jul 13 21:29:16 2022 +0300

    test pull requests on GitHub automatically
---
 .github/workflows/test-prs.yml       | 44 ++++++++++++++++++++++++++++++++++++
 build.gradle                         |  1 +
 datafu-spark/build_and_test_spark.sh |  3 +++
 3 files changed, 48 insertions(+)

diff --git a/.github/workflows/test-prs.yml b/.github/workflows/test-prs.yml
new file mode 100644
index 0000000..ad2f40c
--- /dev/null
+++ b/.github/workflows/test-prs.yml
@@ -0,0 +1,44 @@
+# Build and test datafu-spark code for the latest Scala/Spark combinations for new PRs
+name: "testPRs"
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+  schedule:
+    - cron: '36 3 * * 5'
+
+jobs:
+  analyze:
+    name: Test
+    runs-on: ubuntu-latest
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v3
+
+    - name: Use Java 8
+      uses: actions/setup-java@v2
+      with:
+         java-version: '8'
+         distribution: 'adopt'
+         cache: 'gradle'
+
+
+    - name: Set up Python      
+      uses: actions/setup-python@v4
+      with:
+         python-version: '2.x'
+
+    - name: Bootstrap Gradle 5.6.4
+      run:
+       gradle -b bootstrap.gradle
+
+    - name: Build and run tests
+      run:
+       ./datafu-spark/build_and_test_spark.sh -q
diff --git a/build.gradle b/build.gradle
index f92ce40..ebc4236 100644
--- a/build.gradle
+++ b/build.gradle
@@ -58,6 +58,7 @@ rat {
     '**/*.iml',
     '**/*.iws',
     '**/*.ipr',
+    '**/.idea/**',
     '**/.rubyversion',
     'gradle/wrapper/**',
     '.reviewboardrc',
diff --git a/datafu-spark/build_and_test_spark.sh b/datafu-spark/build_and_test_spark.sh
index a0992db..703818f 100755
--- a/datafu-spark/build_and_test_spark.sh
+++ b/datafu-spark/build_and_test_spark.sh
@@ -45,12 +45,15 @@ function build {
         fi
       else
         log "Testing for Scala $scala, spark $spark failed (build succeeded)"
+        exit 1
       fi
     else
       log "Build for Scala $scala, spark $spark failed"
+      exit 1
     fi
   else
     log "Clean for Scala $scala, Spark $spark failed"
+    exit 1
   fi
 }