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

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


The following commit(s) were added to refs/heads/master by this push:
     new 669c702  Configure Sonarcloud.io - sonarcloud workflow with 
compilation of code and tests, and sonarcloud action to do the scanning and 
upload to site based on sonar-scanner.properties specification - properties 
file with organization, projectKey, module information etc
669c702 is described below

commit 669c702e13c2c1d101fb4da665095b15aa0c5bac
Author: olabusayoT <[email protected]>
AuthorDate: Fri Feb 7 10:11:23 2020 -0500

    Configure Sonarcloud.io
    - sonarcloud workflow with compilation of code and tests, and sonarcloud
    action to do the scanning and upload to site based on
    sonar-scanner.properties specification
    - properties file with organization, projectKey, module information etc
    
    DAFFODIL-2275
---
 .github/workflows/main.yml       |  2 +-
 .github/workflows/sonarcloud.yml | 49 ++++++++++++++++++++++++++++++++++++++++
 sonar-project.properties         | 24 ++++++++++++++++++++
 3 files changed, 74 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8bd05dd..c3d5991 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -6,7 +6,7 @@
 # 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.
diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
new file mode 100644
index 0000000..e8d86b0
--- /dev/null
+++ b/.github/workflows/sonarcloud.yml
@@ -0,0 +1,49 @@
+# 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: SonarCloud Workflow
+on: [push]
+jobs:
+  sonarCloudTrigger:
+    name: SonarCloud Trigger
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        scala_version: [ '2.12.6', '2.11.12' ]
+    steps:
+
+      ############################################################
+      # Setup
+      ############################################################
+
+      - name: Checkout Repository
+        uses: actions/checkout@master
+
+      ############################################################
+      # Build & Scan
+      ############################################################
+
+      - name: Compile
+        run: $SBT compile test:compile it:compile
+        shell: bash
+        env:
+          SBT: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m 
-J-XX:MaxMetaspaceSize=1024m ++${{ matrix.scala_version }} coverage
+
+      - name: SonarCloud Scan
+        uses: sonarsource/sonarcloud-github-action@master
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 0000000..5c179c0
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,24 @@
+# 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.
+
+sonar.organization=apache
+sonar.projectKey=apache_inbubator-daffodil
+
+sonar.modules=daffodil-cli,daffodil-core,daffodil-io,daffodil-japi,daffodil-lib,daffodil-macro-lib,daffodil-propgen,daffodil-runtime1,daffodil-runtime1-unparser,daffodil-sapi,daffodil-tdml-lib,daffodil-tdml-processor,daffodil-test,daffodil-test-ibm1,daffodil-udf
+sonar.sources=src/main
+sonar.tests=src/it,src/test
+sonar.java.binaries=target/**/classes
+sonar.java.test.binaries=target/**/test-classes
+sonar.java.libraries=../lib_managed/**/*.jar

Reply via email to