chore: Fix build ci

Signed-off-by: Javier Aliaga <javier@diagrid.io>
This commit is contained in:
Javier Aliaga 2025-08-26 15:44:22 +02:00
parent ddbecba409
commit bd643b6d49
8 changed files with 47 additions and 77 deletions

View File

@ -1,25 +0,0 @@
#!/bin/sh
wait_for_dapr() {
local port="${1:-3500}"
local max_tries="${2:-60}"
local url="http://localhost:${port}/v1.0/healthz"
local code=""
for i in $(seq 1 "$max_tries"); do
code=$(curl -s -o /dev/null -w "%{http_code}" "$url" || true)
if [ "$code" = "204" ]; then
echo "Ready (204) on port ${port}"
return 0 # do not exit; just return
fi
sleep 1
done
echo "Timeout after ${max_tries}s waiting for 204 on port ${port} (last code: ${code})"
return 0 # keep returning success to avoid exiting callers using set -e
}
# Example usage:
# wait_for_dapr # uses defaults: port 3500, tries 60
# wait_for_dapr 3501 # custom port, default tries
# wait_for_dapr 3501 30 # custom port and tries

View File

@ -112,18 +112,14 @@ jobs:
wget -q ${{ env.TOXIPROXY_URL }} -O /home/runner/.local/bin/toxiproxy-server
chmod +x /home/runner/.local/bin/toxiproxy-server
/home/runner/.local/bin/toxiproxy-server --version
- name: Clean up files
run: ./mvnw clean -B
- name: Build sdk
run: ./mvnw compile -B -q
- name: Clean up and install sdk
run: ./mvnw clean install -B -q -DskipTests
- name: Unit tests
run: ./mvnw test # making it temporarily verbose.
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Codecov
uses: codecov/codecov-action@v5.5.0
- name: Install jars
run: ./mvnw install -q -B -DskipTests
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
id: integration_tests
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests verify

View File

@ -45,7 +45,6 @@ public class DemoFanInOutClient {
DemoFanInOutWorkflow.class,
listOfStrings), Duration.ofSeconds(60));
System.out.printf("Started a new fan out/fan in model workflow with instance ID: %s%n", instanceId);
// Block until the orchestration completes. Then print the final status, which includes the output.

12
pom.xml
View File

@ -658,6 +658,18 @@
<modules>
<module>sdk-tests</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

View File

@ -315,18 +315,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<!--suppress UnresolvedMavenProperty -->
<skip>${skipITs}</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>