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@v4
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@v4
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"
3968 GOPROXY : https://proxy.golang.org
4069 JDK_VER : ${{ matrix.java }}
4170 DAPR_CLI_VER : 1.15.0
42- DAPR_RUNTIME_VER : 1.16.0-rc.3
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 :
@@ -50,28 +79,28 @@ jobs:
5079 uses : docker/setup-docker-action@v4
5180 - name : Check Docker version
5281 run : docker version
53- - uses : actions/checkout@v4
82+ - uses : actions/checkout@v5
5483 - name : Set up OpenJDK ${{ env.JDK_VER }}
55- uses : actions/setup-java@v4
84+ uses : actions/setup-java@v5
5685 with :
5786 distribution : ' temurin'
5887 java-version : ${{ env.JDK_VER }}
5988 - name : Set up Dapr CLI
6089 run : wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
6190 - name : Set up Go ${{ env.GOVER }}
6291 if : env.DAPR_REF != '' || env.DAPR_CLI_REF != ''
63- uses : actions/setup-go@v5
92+ uses : actions/setup-go@v6
6493 with :
6594 go-version : ${{ env.GOVER }}
6695 - name : Checkout Dapr CLI repo to override dapr command.
67- uses : actions/checkout@v4
96+ uses : actions/checkout@v5
6897 if : env.DAPR_CLI_REF != ''
6998 with :
7099 repository : dapr/cli
71100 ref : ${{ env.DAPR_CLI_REF }}
72101 path : cli
73102 - name : Checkout Dapr repo to override daprd.
74- uses : actions/checkout@v4
103+ uses : actions/checkout@v5
75104 if : env.DAPR_REF != ''
76105 with :
77106 repository : dapr/dapr
@@ -84,10 +113,17 @@ jobs:
84113 make
85114 sudo cp dist/linux_amd64/release/dapr /usr/local/bin/dapr
86115 cd ..
87- - name : Initialize Dapr runtime ${{ env.DAPR_RUNTIME_VER }}
116+ - name : Uninstall Dapr runtime ${{ env.DAPR_RUNTIME_VER }}
117+ run : dapr uninstall --all
118+ - name : Ensure Dapr runtime uninstalled
88119 run : |
89- dapr uninstall --all
90- dapr init --runtime-version ${{ env.DAPR_RUNTIME_VER }}
120+ while [ "$(docker ps -aq --filter 'name=^/dapr')" ]; do
121+ echo "Waiting for Dapr containers to be deleted..."
122+ sleep 5
123+ done
124+ echo "All dapr containers are deleted."
125+ - name : Initialize Dapr runtime ${{ env.DAPR_RUNTIME_VER }}
126+ run : dapr init --runtime-version ${{ env.DAPR_RUNTIME_VER }}
91127 - name : Build and override daprd with referenced commit.
92128 if : env.DAPR_REF != ''
93129 run : |
@@ -112,33 +148,13 @@ jobs:
112148 wget -q ${{ env.TOXIPROXY_URL }} -O /home/runner/.local/bin/toxiproxy-server
113149 chmod +x /home/runner/.local/bin/toxiproxy-server
114150 /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.3
125- - name : Install jars
126- run : ./mvnw install -q -B -DskipTests
151+ - name : Clean up and install sdk
152+ run : ./mvnw clean install -B -q -DskipTests
127153 - name : Integration tests using spring boot version ${{ matrix.spring-boot-version }}
128154 id : integration_tests
129- run : PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests verify
155+ run : PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests dependency:copy-dependencies verify
130156 env :
131157 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/
142158 - name : Upload failsafe test report for sdk-tests on failure
143159 if : ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
144160 uses : actions/upload-artifact@v4
@@ -154,7 +170,7 @@ jobs:
154170
155171 publish :
156172 runs-on : ubuntu-latest
157- needs : build
173+ needs : [ build, test ]
158174 timeout-minutes : 30
159175 env :
160176 JDK_VER : 17
@@ -163,9 +179,9 @@ jobs:
163179 GPG_KEY : ${{ secrets.GPG_KEY }}
164180 GPG_PWD : ${{ secrets.GPG_PWD }}
165181 steps :
166- - uses : actions/checkout@v4
182+ - uses : actions/checkout@v5
167183 - name : Set up OpenJDK ${{ env.JDK_VER }}
168- uses : actions/setup-java@v4
184+ uses : actions/setup-java@v5
169185 with :
170186 distribution : ' temurin'
171187 java-version : ${{ env.JDK_VER }}
@@ -181,14 +197,11 @@ jobs:
181197 if : startswith(github.ref, 'refs/tags/v') && !contains(env.PARENT_VERSION, '-SNAPSHOT')
182198 run : |
183199 echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV
184- - name : Install jars
185- if : env.DEPLOY_OSSRH == 'true'
186- run : ./mvnw install -DskipTests -B -q
187200 - name : Publish to ossrh
188201 if : env.DEPLOY_OSSRH == 'true'
189202 run : |
190203 echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg
191204 export GPG_TTY=$(tty)
192205 gpg --batch --import private-key.gpg
193- ./mvnw -V -B -Dgpg.skip=false -s settings.xml deploy
206+ ./mvnw -V -B -Dgpg.skip=false -DskipTests - s settings.xml deploy
194207 curl -X POST https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/io.dapr
0 commit comments