Skip to content

Commit a9ba0fd

Browse files
committed
ci: Split unit test and integration tests
Signed-off-by: Javier Aliaga <javier@diagrid.io>
1 parent 62d66b5 commit a9ba0fd

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,34 @@ on:
1515
- release-*
1616

1717
jobs:
18+
test:
19+
name: "Unit tests jdk:${{ env.JDK_VER }}"
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
34+
- name: Codecov
35+
uses: codecov/codecov-action@v5.5.0
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/
1846
build:
1947
name: "Build jdk:${{ matrix.java }} sb:${{ matrix.spring-boot-display-version }} exp:${{ matrix.experimental }}"
2048
runs-on: ubuntu-latest
@@ -114,27 +142,11 @@ jobs:
114142
/home/runner/.local/bin/toxiproxy-server --version
115143
- name: Clean up and install sdk
116144
run: ./mvnw clean install -B -q -DskipTests
117-
- name: Unit tests
118-
run: ./mvnw test # making it temporarily verbose.
119-
env:
120-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
121-
- name: Codecov
122-
uses: codecov/codecov-action@v5.5.0
123145
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
124146
id: integration_tests
125147
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests verify
126148
env:
127149
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
128-
- name: Upload test report for sdk
129-
uses: actions/upload-artifact@v4
130-
with:
131-
name: report-dapr-java-sdk-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
132-
path: sdk/target/jacoco-report/
133-
- name: Upload test report for sdk-actors
134-
uses: actions/upload-artifact@v4
135-
with:
136-
name: report-dapr-java-sdk-actors-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
137-
path: sdk-actors/target/jacoco-report/
138150
- name: Upload failsafe test report for sdk-tests on failure
139151
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
140152
uses: actions/upload-artifact@v4
@@ -150,7 +162,7 @@ jobs:
150162

151163
publish:
152164
runs-on: ubuntu-latest
153-
needs: build
165+
needs: [ build, test ]
154166
timeout-minutes: 30
155167
env:
156168
JDK_VER: 17

0 commit comments

Comments
 (0)