Commit d3d96197 authored by Jave-Chen's avatar Jave-Chen Committed by khadgarmage
Browse files

Fix sonarcloud analysis on merge PR (#1707)

* #1706 fix sonarcloud analysis on merge PR

* sonarcloud use cobertura report and don't run UT again; include ui source file; merge to one workflow
parent 1f7db8f7
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
# limitations under the License.
#

on: ["pull_request"]
on: [push, "pull_request"]
env:
  DOCKER_DIR: ./docker
  LOG_DIR: /tmp/dolphinscheduler
@@ -49,11 +49,12 @@ jobs:
          export MAVEN_OPTS='-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
          mvn test -Dmaven.test.skip=false cobertura:cobertura
          CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash)
      - name: Run SonarCloud analysis
      - name: Run SonarCloud Analysis
        run: >
          mvn clean --batch-mode
          verify
          mvn verify --batch-mode
          org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.1.1688:sonar
          -Dsonar.junit.reportPaths=target/cobertura
          -Dmaven.test.skip=true
          -Dsonar.host.url=https://sonarcloud.io
          -Dsonar.organization=apache
          -Dsonar.projectKey=apache-dolphinscheduler
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
  <properties>
    <node.version>v12.12.0</node.version>
    <npm.version>6.11.3</npm.version>
    <sonar.sources>src</sonar.sources>
  </properties>
  <profiles>
    <profile>
+1 −0
Original line number Diff line number Diff line
@@ -810,6 +810,7 @@
					<check>
					</check>
					<aggregate>true</aggregate>
					<outputDirectory>./target/cobertura</outputDirectory>
					<encoding>${project.build.sourceEncoding}</encoding>
					<quiet>true</quiet>
					<format>xml</format>