mirror of https://github.com/dapr/java-sdk.git
chore: Fix build ci
Signed-off-by: Javier Aliaga <javier@diagrid.io>
This commit is contained in:
parent
ddbecba409
commit
bd643b6d49
|
|
@ -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
|
|
||||||
|
|
@ -112,18 +112,14 @@ jobs:
|
||||||
wget -q ${{ env.TOXIPROXY_URL }} -O /home/runner/.local/bin/toxiproxy-server
|
wget -q ${{ env.TOXIPROXY_URL }} -O /home/runner/.local/bin/toxiproxy-server
|
||||||
chmod +x /home/runner/.local/bin/toxiproxy-server
|
chmod +x /home/runner/.local/bin/toxiproxy-server
|
||||||
/home/runner/.local/bin/toxiproxy-server --version
|
/home/runner/.local/bin/toxiproxy-server --version
|
||||||
- name: Clean up files
|
- name: Clean up and install sdk
|
||||||
run: ./mvnw clean -B
|
run: ./mvnw clean install -B -q -DskipTests
|
||||||
- name: Build sdk
|
|
||||||
run: ./mvnw compile -B -q
|
|
||||||
- name: Unit tests
|
- name: Unit tests
|
||||||
run: ./mvnw test # making it temporarily verbose.
|
run: ./mvnw test # making it temporarily verbose.
|
||||||
env:
|
env:
|
||||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||||
- name: Codecov
|
- name: Codecov
|
||||||
uses: codecov/codecov-action@v5.5.0
|
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 }}
|
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
|
||||||
id: integration_tests
|
id: integration_tests
|
||||||
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests verify
|
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests verify
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ public class DemoFanInOutClient {
|
||||||
DemoFanInOutWorkflow.class,
|
DemoFanInOutWorkflow.class,
|
||||||
listOfStrings), Duration.ofSeconds(60));
|
listOfStrings), Duration.ofSeconds(60));
|
||||||
|
|
||||||
|
|
||||||
System.out.printf("Started a new fan out/fan in model workflow with instance ID: %s%n", instanceId);
|
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.
|
// Block until the orchestration completes. Then print the final status, which includes the output.
|
||||||
|
|
|
||||||
12
pom.xml
12
pom.xml
|
|
@ -658,6 +658,18 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>sdk-tests</module>
|
<module>sdk-tests</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -315,18 +315,6 @@
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-failsafe-plugin</artifactId>
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
<version>3.2.2</version>
|
<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>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue