Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
500493f
Segregate Docker-dependent tests to GitHub Actions workflow
rujche Jun 12, 2026
bbcbe63
Fix surefire plugin version marker for pom scanner
rujche Jun 12, 2026
4305a83
Apply suggestion from @mikeharder
mikeharder Jun 16, 2026
17be87a
Merge branch 'main' into rujche/main/update-pipeline-to-fit-network-c…
mikeharder Jun 16, 2026
15d5972
Update workflow actions to latest major versions (checkout@v6, setup-…
Copilot Jun 16, 2026
986471e
Update .github/workflows/spring-docker-tests.yml
rujche Jun 17, 2026
e8344ea
Merge branch 'main' into rujche/main/update-pipeline-to-fit-network-c…
rujche Jun 17, 2026
867a0f2
Update maven-surefire-plugin version to 3.5.6 in spring pom.xml files
Copilot Jun 17, 2026
e7484cb
Disable parallel execution for Spring docker-tagged tests
Copilot Jun 17, 2026
acbb292
Potential fix for pull request finding
rujche Jun 17, 2026
154c419
Update paths which will trigger github action
rujche Jun 17, 2026
308b1a4
fix: improve spring-docker-tests workflow clarity
rujche Jun 17, 2026
c20b498
revert: restore broad sdk/spring paths filter
rujche Jun 17, 2026
eb1c3e0
revert: restore original GitHub Actions versions
rujche Jun 17, 2026
4f0bb67
optimize: add maven flags to speed up spring-docker-tests workflow
rujche Jun 17, 2026
1390185
optimize: add maven flags to spring docker-tagged tests step
rujche Jun 17, 2026
9149e64
cleanup: remove unnecessary -DfailIfNoTests=false from test step
rujche Jun 17, 2026
0c1cf4a
fix: standardize maven property flags format
rujche Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/spring-docker-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Spring Docker Tests

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this workflow be required check for pull requests?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a repo level setting instead of GitHub work flow setting. Here is the detailed steps I got from Copilot:

image image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I knew it's branch policy settings. My question was that would you expect to set this workflow as required for PRs targeting the main branch?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I don't have permission to configure the branch policy, could you please help to set it?

@mikeharder mikeharder Jun 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required checks are tricky, because then they need to run on every PR and give a green no-op. maybe better to keep this optional and hope people just don't merge with it failing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because then they need to run on every PR

Not every PR, only PRs that modified related files.

give a green no-op

What does this mean?


on:
pull_request:
paths:
- '.github/workflows/spring-docker-tests.yml'
- 'sdk/spring/**'
workflow_dispatch:

permissions:
contents: read

jobs:
spring-docker-tests:
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
cache: maven

- name: Verify Docker
run: |
docker version
docker info

- name: Build spring docker test dependencies
run: >
mvn -f sdk/spring/pom.xml
-pl spring-cloud-azure-testcontainers,spring-cloud-azure-docker-compose
-am
install
-Dcheckstyle.skip=true
-Dcodesnippet.skip=true
-Denforcer.skip=true
-Djacoco.skip=true
-Dmaven.javadoc.skip=true
-Drevapi.skip=true
-DskipTests
-Dspotbugs.skip=true
-Pdev
-T 4
-ntp
-DfailIfNoTests=false

- name: Run spring docker-tagged tests
run: >
mvn -f sdk/spring/pom.xml
-pl spring-cloud-azure-testcontainers,spring-cloud-azure-docker-compose
test
-Pdocker-tests
-Dcheckstyle.skip=true
-Dcodesnippet.skip=true
-Denforcer.skip=true
-Djacoco.skip=true
-Dmaven.javadoc.skip=true
-Dspotbugs.skip=true
-T 4
-ntp
19 changes: 19 additions & 0 deletions sdk/spring/spring-cloud-azure-docker-compose/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<jacoco.skip>true</jacoco.skip>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<surefire.test.groups/>
<surefire.excluded.test.groups>docker</surefire.excluded.test.groups>
Comment thread
rujche marked this conversation as resolved.
<legal>
<![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
<site.url>https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java</site.url>
Expand Down Expand Up @@ -196,6 +198,15 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
Comment thread
rujche marked this conversation as resolved.
<groups>${surefire.test.groups}</groups>
<excludedGroups>${surefire.excluded.test.groups}</excludedGroups>
</configuration>
Comment thread
rujche marked this conversation as resolved.
</plugin>
Comment thread
Copilot marked this conversation as resolved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down Expand Up @@ -278,6 +289,14 @@
</build>

<profiles>
<profile>
<id>docker-tests</id>
<properties>
<parallelizeTests>same_thread</parallelizeTests>
<surefire.test.groups>docker</surefire.test.groups>
<surefire.excluded.test.groups/>
</properties>
</profile>
<!-- Library cannot build for Java 16 and below -->
<profile>
<id>below-java-17</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.azure.spring.cloud.service.servicebus.consumer.ServiceBusErrorHandler;
import com.azure.spring.cloud.service.servicebus.consumer.ServiceBusRecordMessageListener;
import com.azure.spring.messaging.servicebus.core.ServiceBusTemplate;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand Down Expand Up @@ -42,6 +43,7 @@
"spring.cloud.azure.servicebus.processor.entity-name=queue.1",
"spring.cloud.azure.servicebus.processor.entity-type=queue"
})
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class ServiceBusDockerComposeConnectionDetailsFactoryTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.AzureEventHubsAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.properties.AzureEventHubsConnectionDetails;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand All @@ -30,6 +31,7 @@
"spring.cloud.azure.eventhubs.event-hub-name=eh1",
"spring.cloud.azure.eventhubs.producer.event-hub-name=eh1"
})
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class EventHubsDockerComposeConnectionDetailsFactoryTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.storage.blob.AzureStorageBlobAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.storage.blob.AzureStorageBlobResourceAutoConfiguration;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand All @@ -28,6 +29,7 @@
"spring.docker.compose.file=classpath:com/azure/spring/cloud/docker/compose/implementation/service/connection/storage/storage-compose.yaml",
"spring.docker.compose.stop.command=down"
})
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class StorageBlobDockerComposeConnectionDetailsFactoryTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.storage.queue.AzureStorageQueueAutoConfiguration;
import com.azure.storage.queue.QueueClient;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand All @@ -22,6 +23,7 @@
"spring.docker.compose.stop.command=down",
"spring.cloud.azure.storage.queue.queue-name=devstoreaccount1/tc-queue"
})
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class StorageQueueDockerComposeConnectionDetailsFactoryTests {

Expand Down
19 changes: 19 additions & 0 deletions sdk/spring/spring-cloud-azure-testcontainers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<jacoco.skip>true</jacoco.skip>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<surefire.test.groups/>
<surefire.excluded.test.groups>docker</surefire.excluded.test.groups>
Comment thread
rujche marked this conversation as resolved.
<legal>
<![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
<site.url>https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java</site.url>
Expand Down Expand Up @@ -204,6 +206,15 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version> <!-- {x-version-update;springboot4_org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
Comment thread
rujche marked this conversation as resolved.
<groups>${surefire.test.groups}</groups>
<excludedGroups>${surefire.excluded.test.groups}</excludedGroups>
</configuration>
Comment thread
rujche marked this conversation as resolved.
</plugin>
Comment thread
Copilot marked this conversation as resolved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down Expand Up @@ -286,6 +297,14 @@
</build>

<profiles>
<profile>
<id>docker-tests</id>
<properties>
<parallelizeTests>same_thread</parallelizeTests>
<surefire.test.groups>docker</surefire.test.groups>
<surefire.excluded.test.groups/>
</properties>
</profile>
<!-- Library cannot build for Java 16 and below -->
<profile>
<id>below-java-17</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.azure.spring.cloud.service.servicebus.consumer.ServiceBusErrorHandler;
import com.azure.spring.cloud.service.servicebus.consumer.ServiceBusRecordMessageListener;
import com.azure.spring.messaging.servicebus.core.ServiceBusTemplate;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand Down Expand Up @@ -41,6 +42,7 @@
@TestPropertySource(properties = { "spring.cloud.azure.servicebus.entity-name=queue.1",
"spring.cloud.azure.servicebus.entity-type=queue" })
@Testcontainers
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class ServiceBusContainerConnectionDetailsFactoryTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.azure.spring.data.cosmos.repository.CosmosRepository;
import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand Down Expand Up @@ -41,6 +42,7 @@

@SpringJUnitConfig
@Testcontainers
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class CosmosContainerConnectionDetailsFactoryTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.AzureEventHubsAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.properties.AzureEventHubsConnectionDetails;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand Down Expand Up @@ -35,6 +36,7 @@
"spring.cloud.azure.eventhubs.event-hub-name=eh1"
})
@Testcontainers
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class EventHubsContainerConnectionDetailsFactoryTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.storage.blob.AzureStorageBlobAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.storage.blob.AzureStorageBlobResourceAutoConfiguration;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand All @@ -29,6 +30,7 @@

@SpringJUnitConfig
@Testcontainers
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class StorageBlobContainerConnectionDetailsFactoryTests {
@Container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.azure.spring.cloud.autoconfigure.implementation.context.AzureGlobalPropertiesAutoConfiguration;
import com.azure.spring.cloud.autoconfigure.implementation.storage.queue.AzureStorageQueueAutoConfiguration;
import com.azure.storage.queue.QueueClient;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
Comment thread
Copilot marked this conversation as resolved.
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand All @@ -24,6 +25,7 @@
@SpringJUnitConfig
@TestPropertySource(properties = "spring.cloud.azure.storage.queue.queue-name=devstoreaccount1/tc-queue")
@Testcontainers
@Tag("docker")
@EnabledOnOs(OS.LINUX)
class StorageQueueContainerConnectionDetailsFactoryTests {

Expand Down