26
26
branches :
27
27
- ' [0-9]+.[0-9]+.[0-9]+-prepare'
28
28
- ' [0-9]+.[0-9]+.[0-9]+-release'
29
+ - dev
30
+ pull_request_target :
31
+ paths :
32
+ - ' **/pom.xml'
29
33
30
34
env :
31
35
LOG_DIR : /tmp/dolphinscheduler
@@ -35,6 +39,10 @@ concurrency:
35
39
cancel-in-progress : true
36
40
37
41
jobs :
42
+ build :
43
+ permissions :
44
+ contents : read
45
+ pull-requests : write
38
46
paths-filter :
39
47
name : Unit-Test-Path-Filter
40
48
runs-on : ubuntu-latest
79
87
run : ./mvnw clean verify -B -Dmaven.test.skip=false -Dspotless.skip=true -DskipUT=false
80
88
- name : Upload coverage report to codecov
81
89
run : CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash)
82
- sonarcloud-analysis :
83
- name : SonarCloud-Analysis
84
- needs : paths-filter
85
- runs-on : ubuntu-latest
86
- timeout-minutes : 30
87
- steps :
88
- - uses : actions/checkout@v4
89
- with :
90
- submodules : true
91
- - uses : actions/cache@v4
92
- with :
93
- path : ~/.m2/repository
94
- key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-unit-test
95
- restore-keys : ${{ runner.os }}-maven-
90
+
96
91
# Set up JDK 17 for SonarCloud.
97
92
- name : Set up JDK 17
98
93
uses : actions/setup-java@v4
@@ -109,9 +104,11 @@ jobs:
109
104
-Dsonar.organization=apache
110
105
-Dsonar.core.codeCoveragePlugin=jacoco
111
106
-Dsonar.projectKey=apache-dolphinscheduler
107
+ -Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682
112
108
-Dsonar.exclusions=,dolphinscheduler-ui/src/**/i18n/locale/*.js,dolphinscheduler-microbench/src/**/*
113
- -Dsonar.token=e4058004bc6be89decf558ac819aa1ecbee57682
114
- -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
109
+ -Dhttp.keepAlive=false
110
+ -Dmaven.wagon.http.pool=false
111
+ -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
115
112
-DskipUT=true
116
113
env :
117
114
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -120,7 +117,7 @@ jobs:
120
117
name : Unit Test
121
118
runs-on : ubuntu-latest
122
119
timeout-minutes : 30
123
- needs : [ unit-test, paths-filter, sonarcloud-analysis ]
120
+ needs : [ unit-test, paths-filter ]
124
121
if : always()
125
122
steps :
126
123
- name : Status
@@ -129,7 +126,7 @@ jobs:
129
126
echo "Skip Unit Test!"
130
127
exit 0
131
128
fi
132
- if [[ ${{ needs.unit-test.result }} != 'success' || ${{ needs.sonarcloud-analysis.result }} != 'success' ]]; then
129
+ if [[ ${{ needs.unit-test.result }} != 'success' ]]; then
133
130
echo "Unit Test Failed!"
134
131
exit -1
135
132
fi
0 commit comments