Skip to content

Commit

Permalink
build: change TCC detection condition
Browse files Browse the repository at this point in the history
  • Loading branch information
npepinpe committed Dec 29, 2024
1 parent 5c88939 commit f6080e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
token: ${{ secrets.TC_CLOUD_TOKEN }}
- name: Test
timeout-minutes: 20
env:
TCC_ENABLED: true
run: >
./mvnw -B -Pparallel-tests -DforkCount=2C -DskipChecks -pl core verify
- name: Terminate Testcontainers Cloud Client active sessions
Expand Down Expand Up @@ -90,6 +92,8 @@ jobs:
token: ${{ secrets.TC_CLOUD_TOKEN }}
- name: Test
timeout-minutes: 20
env:
TCC_ENABLED: true
run: >
./mvnw -B -Pparallel-tests -DforkCount=2C -DskipChecks -pl engine verify
- name: Terminate Testcontainers Cloud Client active sessions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.condition.DisabledIf;
import org.testcontainers.DockerClientFactory;
import org.testcontainers.Testcontainers;

@API(status = Status.INTERNAL)
public final class TestcontainersSupport {
Expand All @@ -37,7 +38,7 @@ private TestcontainersSupport() {}
* <p>This isn't perfect as it's clearly breaking implementation details, but it works for now.
*/
public static boolean isCloudEnv() {
if (System.getenv().containsKey("TC_CLOUD_TOKEN")) {
if (System.getenv().getOrDefault("TCC_ENABLED", "false").equals("true")) {
return true;
}

Expand Down

0 comments on commit f6080e0

Please sign in to comment.