Skip to content

Commit

Permalink
improvement 16096
Browse files Browse the repository at this point in the history
  • Loading branch information
SbloodyS committed Sep 19, 2024
1 parent ba566f7 commit 1e064b8
Showing 1 changed file with 43 additions and 19 deletions.
62 changes: 43 additions & 19 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,52 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Sanity Check
uses: ./.github/actions/sanity-check
with:
token: ${{ secrets.GITHUB_TOKEN }}
# - name: Sanity Check
# uses: ./.github/actions/sanity-check
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Set up JDK ${{ matrix.java }}
# uses: actions/setup-java@v4
# with:
# java-version: ${{ matrix.java }}
# distribution: 'adopt'
# - uses: actions/cache@v4
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-backend
# restore-keys: ${{ runner.os }}-maven-
# - name: Run Unit tests
# run: ./mvnw clean verify -B -Dmaven.test.skip=false -Dspotless.skip=true -DskipUT=false
# - name: Upload coverage report to codecov
# run: CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash)

# Set up JDK 17 for SonarCloud.
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# java-version: 17
# distribution: 'adopt'
# Sonar check need to run after jacoco report generated.
- name: Run SonarCloud Analysis
if: ${{ matrix.java.version }} == '8'
run: >
./mvnw --batch-mode verify sonar:sonar
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
-Dmaven.test.skip=true
-Dspotless.skip=true
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=apache
-Dsonar.core.codeCoveragePlugin=jacoco
-Dsonar.projectKey=apache-dolphinscheduler
-Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682
-Dsonar.exclusions=dolphinscheduler-ui/src/**/i18n/locale/*.js,dolphinscheduler-microbench/src/**/*
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-DskipUT=true
if [[ ${{ matrix.java.version }} == '8' ]]; then
./mvnw --batch-mode verify sonar:sonar
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
-Dmaven.test.skip=true
-Dspotless.skip=true
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=apache
-Dsonar.core.codeCoveragePlugin=jacoco
-Dsonar.projectKey=apache-dolphinscheduler
-Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682
-Dsonar.exclusions=dolphinscheduler-ui/src/**/i18n/locale/*.js,dolphinscheduler-microbench/src/**/*
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-DskipUT=true
else
echo "Skip Run SonarCloud Analysis."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down

0 comments on commit 1e064b8

Please sign in to comment.