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@v2
@@ -110,8 +105,9 @@ jobs:
110
105
-Dsonar.core.codeCoveragePlugin=jacoco
111
106
-Dsonar.projectKey=apache-dolphinscheduler
112
107
-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
108
+ -Dhttp.keepAlive=false
109
+ -Dmaven.wagon.http.pool=false
110
+ -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
115
111
-DskipUT=true
116
112
env :
117
113
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -120,7 +116,7 @@ jobs:
120
116
name : Unit Test
121
117
runs-on : ubuntu-latest
122
118
timeout-minutes : 30
123
- needs : [ unit-test, paths-filter, sonarcloud-analysis ]
119
+ needs : [ unit-test, paths-filter ]
124
120
if : always()
125
121
steps :
126
122
- name : Status
@@ -129,7 +125,7 @@ jobs:
129
125
echo "Skip Unit Test!"
130
126
exit 0
131
127
fi
132
- if [[ ${{ needs.unit-test.result }} != 'success' || ${{ needs.sonarcloud-analysis.result }} != 'success' ]]; then
128
+ if [[ ${{ needs.unit-test.result }} != 'success' ]]; then
133
129
echo "Unit Test Failed!"
134
130
exit -1
135
131
fi
0 commit comments