Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
54 changes: 54 additions & 0 deletions .github/workflows/spring-docker-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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?

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.

If a check is required in github, PRs can only merge if the check is run, and is passing. So any required check needs to run on every PR (not just a subset of changed files), and it must pass if it doesn't apply. However, we generally don't want to do this, it wastes resources and clutters the UI on every PR.

Instead, you can either live with the check being optional for now. Or you will need to wait until we have a new app-based check-enforcer meta-check that @raych1 is starting to work on.

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.

@mikeharder Thanks for the detailed explanation.

you can either live with the check being optional for now.

I can accept this.


on:
pull_request:
paths:
- '.github/workflows/spring-docker-tests.yml'
- 'pom.xml'

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.

Should this really trigger on every PR that changes any pom.xml?

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.

This is not every pom.xml, it's just the root pom.xml: https://github.com/Azure/azure-sdk-for-java/blob/main/pom.xml

- 'sdk/spring/**'
- 'sdk/parents/**'
Comment thread
Copilot marked this conversation as resolved.
Outdated
workflow_dispatch:

permissions:
contents: read

jobs:
spring-docker-tests:
runs-on: ubuntu-24.04
timeout-minutes: 45
Comment thread
rujche marked this conversation as resolved.
Outdated

steps:
- name: Checkout code
uses: actions/checkout@v4
Comment thread
rujche marked this conversation as resolved.
Outdated

- name: Set up JDK 17
uses: actions/setup-java@v4
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
-DskipTests
-DskipITs
-DfailIfNoTests=false
Comment thread
rujche marked this conversation as resolved.

- 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
-DfailIfNoTests=false
-DskipITs
-DskipTests=false
Comment thread
mikeharder marked this conversation as resolved.
Outdated
17 changes: 17 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,14 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<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 +288,13 @@
</build>

<profiles>
<profile>
<id>docker-tests</id>
<properties>
<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
17 changes: 17 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,14 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<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 +296,13 @@
</build>

<profiles>
<profile>
<id>docker-tests</id>
<properties>
<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
Loading