1515 - release-*
1616
1717jobs :
18+ test :
19+ name : " Unit tests"
20+ runs-on : ubuntu-latest
21+ timeout-minutes : 30
22+ continue-on-error : false
23+ env :
24+ JDK_VER : 17
25+ steps :
26+ - uses : actions/checkout@v5
27+ - name : Set up OpenJDK ${{ env.JDK_VER }}
28+ uses : actions/setup-java@v4
29+ with :
30+ distribution : ' temurin'
31+ java-version : ${{ env.JDK_VER }}
32+ - name : Run tests
33+ run : ./mvnw clean install -B -q -DskipITs=true
34+ - name : Codecov
35+ uses : codecov/codecov-action@v5.5.1
36+ - name : Upload test report for sdk
37+ uses : actions/upload-artifact@v5
38+ with :
39+ name : test-dapr-java-sdk-jdk${{ env.JDK_VER }}
40+ path : sdk/target/jacoco-report/
41+ - name : Upload test report for sdk-actors
42+ uses : actions/upload-artifact@v5
43+ with :
44+ name : report-dapr-java-sdk-actors-jdk${{ env.JDK_VER }}
45+ path : sdk-actors/target/jacoco-report/
46+
1847 build :
1948 name : " Build jdk:${{ matrix.java }} sb:${{ matrix.spring-boot-display-version }} exp:${{ matrix.experimental }}"
2049 runs-on : ubuntu-latest
@@ -24,13 +53,13 @@ jobs:
2453 fail-fast : false
2554 matrix :
2655 java : [ 17 ]
27- spring-boot-version : [ 3.4.3 ]
28- spring-boot-display-version : [ 3.4 .x ]
56+ spring-boot-version : [ 3.5.4 ]
57+ spring-boot-display-version : [ 3.5 .x ]
2958 experimental : [ false ]
3059 include :
3160 - java : 17
32- spring-boot-version : 3.3 .9
33- spring-boot-display-version : 3.3 .x
61+ spring-boot-version : 3.4 .9
62+ spring-boot-display-version : 3.4 .x
3463 experimental : false
3564 env :
3665 GOVER : " 1.20"
@@ -39,39 +68,36 @@ jobs:
3968 GOPROXY : https://proxy.golang.org
4069 JDK_VER : ${{ matrix.java }}
4170 DAPR_CLI_VER : 1.15.0
42- DAPR_RUNTIME_VER : 1.15.4
71+ DAPR_RUNTIME_VER : 1.16.0-rc.5
4372 DAPR_INSTALL_URL : https://raw.githubusercontent.com/dapr/cli/v1.15.0/install/install.sh
4473 DAPR_CLI_REF :
4574 DAPR_REF :
4675 TOXIPROXY_URL : https://github.com/Shopify/toxiproxy/releases/download/v2.5.0/toxiproxy-server-linux-amd64
4776 steps :
48- - name : Install Stable Docker
49- id : setup_docker
50- uses : docker/setup-docker-action@v4
77+ - uses : actions/checkout@v5
5178 - name : Check Docker version
52- run : docker version
53- - uses : actions/checkout@v4
79+ run : docker version
5480 - name : Set up OpenJDK ${{ env.JDK_VER }}
55- uses : actions/setup-java@v4
81+ uses : actions/setup-java@v5
5682 with :
5783 distribution : ' temurin'
5884 java-version : ${{ env.JDK_VER }}
5985 - name : Set up Dapr CLI
6086 run : wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
6187 - name : Set up Go ${{ env.GOVER }}
6288 if : env.DAPR_REF != '' || env.DAPR_CLI_REF != ''
63- uses : actions/setup-go@v5
89+ uses : actions/setup-go@v6
6490 with :
6591 go-version : ${{ env.GOVER }}
6692 - name : Checkout Dapr CLI repo to override dapr command.
67- uses : actions/checkout@v4
93+ uses : actions/checkout@v5
6894 if : env.DAPR_CLI_REF != ''
6995 with :
7096 repository : dapr/cli
7197 ref : ${{ env.DAPR_CLI_REF }}
7298 path : cli
7399 - name : Checkout Dapr repo to override daprd.
74- uses : actions/checkout@v4
100+ uses : actions/checkout@v5
75101 if : env.DAPR_REF != ''
76102 with :
77103 repository : dapr/dapr
@@ -84,10 +110,17 @@ jobs:
84110 make
85111 sudo cp dist/linux_amd64/release/dapr /usr/local/bin/dapr
86112 cd ..
87- - name : Initialize Dapr runtime ${{ env.DAPR_RUNTIME_VER }}
113+ - name : Uninstall Dapr runtime ${{ env.DAPR_RUNTIME_VER }}
114+ run : dapr uninstall --all
115+ - name : Ensure Dapr runtime uninstalled
88116 run : |
89- dapr uninstall --all
90- dapr init --runtime-version ${{ env.DAPR_RUNTIME_VER }}
117+ while [ "$(docker ps -aq --filter 'name=^/dapr')" ]; do
118+ echo "Waiting for Dapr containers to be deleted..."
119+ sleep 5
120+ done
121+ echo "All dapr containers are deleted."
122+ - name : Initialize Dapr runtime ${{ env.DAPR_RUNTIME_VER }}
123+ run : dapr init --runtime-version ${{ env.DAPR_RUNTIME_VER }}
91124 - name : Build and override daprd with referenced commit.
92125 if : env.DAPR_REF != ''
93126 run : |
@@ -112,49 +145,27 @@ jobs:
112145 wget -q ${{ env.TOXIPROXY_URL }} -O /home/runner/.local/bin/toxiproxy-server
113146 chmod +x /home/runner/.local/bin/toxiproxy-server
114147 /home/runner/.local/bin/toxiproxy-server --version
115- - name : Clean up files
116- run : ./mvnw clean -B
117- - name : Build sdk
118- run : ./mvnw compile -B -q
119- - name : Unit tests
120- run : ./mvnw test # making it temporarily verbose.
121- env :
122- DOCKER_HOST : ${{steps.setup_docker.outputs.sock}}
123- - name : Codecov
124- uses : codecov/codecov-action@v5.4.2
125- - name : Install jars
126- run : ./mvnw install -q -B -DskipTests
148+ - name : Clean up and install sdk
149+ run : ./mvnw clean install -B -q -DskipTests
127150 - name : Integration tests using spring boot version ${{ matrix.spring-boot-version }}
128151 id : integration_tests
129- run : PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests verify
130- env :
131- DOCKER_HOST : ${{steps.setup_docker.outputs.sock}}
132- - name : Upload test report for sdk
133- uses : actions/upload-artifact@v4
134- with :
135- name : report-dapr-java-sdk-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
136- path : sdk/target/jacoco-report/
137- - name : Upload test report for sdk-actors
138- uses : actions/upload-artifact@v4
139- with :
140- name : report-dapr-java-sdk-actors-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
141- path : sdk-actors/target/jacoco-report/
152+ run : PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests dependency:copy-dependencies verify
142153 - name : Upload failsafe test report for sdk-tests on failure
143154 if : ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
144- uses : actions/upload-artifact@v4
155+ uses : actions/upload-artifact@v5
145156 with :
146157 name : failsafe-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
147158 path : sdk-tests/target/failsafe-reports
148159 - name : Upload surefire test report for sdk-tests on failure
149160 if : ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
150- uses : actions/upload-artifact@v4
161+ uses : actions/upload-artifact@v5
151162 with :
152163 name : surefire-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
153164 path : sdk-tests/target/surefire-reports
154165
155166 publish :
156167 runs-on : ubuntu-latest
157- needs : build
168+ needs : [ build, test ]
158169 timeout-minutes : 30
159170 env :
160171 JDK_VER : 17
@@ -163,9 +174,9 @@ jobs:
163174 GPG_KEY : ${{ secrets.GPG_KEY }}
164175 GPG_PWD : ${{ secrets.GPG_PWD }}
165176 steps :
166- - uses : actions/checkout@v4
177+ - uses : actions/checkout@v5
167178 - name : Set up OpenJDK ${{ env.JDK_VER }}
168- uses : actions/setup-java@v4
179+ uses : actions/setup-java@v5
169180 with :
170181 distribution : ' temurin'
171182 java-version : ${{ env.JDK_VER }}
@@ -181,13 +192,11 @@ jobs:
181192 if : startswith(github.ref, 'refs/tags/v') && !contains(env.PARENT_VERSION, '-SNAPSHOT')
182193 run : |
183194 echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV
184- - name : Install jars
185- if : env.DEPLOY_OSSRH == 'true'
186- run : ./mvnw install -DskipTests -B -q
187195 - name : Publish to ossrh
188196 if : env.DEPLOY_OSSRH == 'true'
189197 run : |
190198 echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg
191199 export GPG_TTY=$(tty)
192200 gpg --batch --import private-key.gpg
193- ./mvnw -V -B -Dgpg.skip=false -s settings.xml deploy
201+ ./mvnw -V -B -Dgpg.skip=false -DskipTests -s settings.xml deploy
202+ curl -X POST https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/io.dapr
0 commit comments