Skip to content

Commit 5ad874f

Browse files
authored
Merge branch 'main' into docker-context
2 parents 055523f + e0321d9 commit 5ad874f

File tree

100 files changed

+1374
-454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1374
-454
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ body:
6464
- Timeplus
6565
- ToxiProxy
6666
- Trino
67+
- Typesense
6768
- Vault
6869
- Weaviate
6970
- YugabyteDB

.github/ISSUE_TEMPLATE/enhancement.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ body:
6464
- Timeplus
6565
- ToxiProxy
6666
- Trino
67+
- Typesense
6768
- Vault
6869
- Weaviate
6970
- YugabyteDB

.github/ISSUE_TEMPLATE/feature.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ body:
6464
- Timeplus
6565
- ToxiProxy
6666
- Trino
67+
- Typesense
6768
- Vault
6869
- Weaviate
6970
- YugabyteDB

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,11 @@ updates:
361361
schedule:
362362
interval: "weekly"
363363
open-pull-requests-limit: 10
364+
- package-ecosystem: "gradle"
365+
directory: "/modules/typesense"
366+
schedule:
367+
interval: "weekly"
368+
open-pull-requests-limit: 10
364369
- package-ecosystem: "gradle"
365370
directory: "/modules/vault"
366371
schedule:

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@
232232
- changed-files:
233233
- any-glob-to-any-file:
234234
- modules/trino/**/*
235+
"modules/typesense":
236+
- changed-files:
237+
- any-glob-to-any-file:
238+
- modules/typesense/**/*
235239
"modules/vault":
236240
- changed-files:
237241
- any-glob-to-any-file:

.github/settings.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repository:
1313
homepage: https://testcontainers.org
1414

1515
# A comma-separated list of topics to set on the repository
16-
topics: java,testing,docker,docker-compose,jvm,test-automation,junit,hacktoberfest
16+
topics: java,testing,docker,docker-compose,jvm,test-automation,junit,hacktoberfest,integration-testing
1717

1818
# Either `true` to make the repository private, or `false` to make it public.
1919
private: false
@@ -262,6 +262,9 @@ labels:
262262
- name: modules/trino
263263
color: '#006b75'
264264

265+
- name: modules/typesense
266+
color: '#006b75'
267+
265268
- name: modules/vault
266269
color: '#006b75'
267270

.github/workflows/ci-windows.yml

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ permissions:
4343
contents: read
4444

4545
jobs:
46-
core:
47-
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event.client_payload.slash_command.command == 'windows-test' }}
46+
main:
47+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
4848
runs-on: self-hosted
4949
permissions:
5050
checks: write
@@ -53,3 +53,62 @@ jobs:
5353
- name: Build with Gradle
5454
run: ./gradlew.bat cleanTest testcontainers:test --no-daemon --continue --scan --no-build-cache
5555
- uses: ./.github/actions/setup-junit-report
56+
57+
pr:
58+
if: ${{ github.event.client_payload.slash_command.command == 'windows-test' }}
59+
runs-on: self-hosted
60+
permissions:
61+
checks: write
62+
statuses: write
63+
steps:
64+
- name: Create pending status
65+
uses: actions/github-script@v7
66+
with:
67+
github-token: ${{ secrets.GITHUB_TOKEN }}
68+
script: |
69+
github.rest.repos.createCommitStatus({
70+
owner: context.repo.owner,
71+
repo: context.repo.repo,
72+
sha: context.payload.client_payload.pull_request.head.sha,
73+
state: 'pending',
74+
target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
75+
context: 'CI - Windows',
76+
})
77+
- uses: actions/checkout@v4
78+
with:
79+
token: ${{ secrets.GITHUB_TOKEN }}
80+
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
81+
ref: ${{ github.event.client_payload.pull_request.head.ref }}
82+
- name: Build with Gradle
83+
run: ./gradlew.bat cleanTest testcontainers:test --no-daemon --continue --scan --no-build-cache
84+
- uses: ./.github/actions/setup-junit-report
85+
86+
- name: Create success status
87+
uses: actions/github-script@v7
88+
if: success()
89+
with:
90+
github-token: ${{ secrets.GITHUB_TOKEN }}
91+
script: |
92+
github.rest.repos.createCommitStatus({
93+
owner: context.repo.owner,
94+
repo: context.repo.repo,
95+
sha: context.payload.client_payload.pull_request.head.sha,
96+
state: 'success',
97+
target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
98+
context: 'CI - Windows',
99+
})
100+
101+
- name: Create failure status
102+
uses: actions/github-script@v7
103+
if: failure()
104+
with:
105+
github-token: ${{ secrets.GITHUB_TOKEN }}
106+
script: |
107+
github.rest.repos.createCommitStatus({
108+
owner: context.repo.owner,
109+
repo: context.repo.repo,
110+
sha: context.payload.client_payload.pull_request.head.sha,
111+
state: 'failure',
112+
target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
113+
context: 'CI - Windows',
114+
})

.github/workflows/moby-latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
{
5151
"tc_project": "testcontainers-java",
5252
"tc_docker_install_type": "${{ matrix.install-docker-type }}",
53-
"tc_github_action_url": "https://github.com/testcontainers/testcontainers-java/actions/runs/${{ env.GITHUB_RUN_ID }}/job/${{ env.GITHUB_RUN_NUMBER }}",
53+
"tc_github_action_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ github.run_number }}",
5454
"tc_github_action_status": "FAILED",
5555
"tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}"
5656
}

core/src/main/java/org/testcontainers/containers/ComposeCommand.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package org.testcontainers.containers;
22

3-
import org.apache.commons.lang3.StringUtils;
4-
53
import java.util.Set;
64

75
class ComposeCommand {
86

97
static String getDownCommand(ComposeDelegate.ComposeVersion composeVersion, Set<String> options) {
108
String composeOptions = optionsAsString(options);
11-
if (composeOptions == null || composeOptions.equals("")) {
9+
if (composeOptions.isEmpty()) {
1210
return composeVersion == ComposeDelegate.ComposeVersion.V1 ? "down" : "compose down";
1311
}
1412
String cmd = composeVersion == ComposeDelegate.ComposeVersion.V1 ? "%s down" : "compose %s down";
@@ -17,7 +15,7 @@ static String getDownCommand(ComposeDelegate.ComposeVersion composeVersion, Set<
1715

1816
static String getUpCommand(ComposeDelegate.ComposeVersion composeVersion, Set<String> options) {
1917
String composeOptions = optionsAsString(options);
20-
if (composeOptions == null || composeOptions.equals("")) {
18+
if (composeOptions.isEmpty()) {
2119
return composeVersion == ComposeDelegate.ComposeVersion.V1 ? "up -d" : "compose up -d";
2220
}
2321
String cmd = composeVersion == ComposeDelegate.ComposeVersion.V1 ? "%s up -d" : "compose %s up -d";
@@ -31,7 +29,7 @@ private static String optionsAsString(final Set<String> options) {
3129
return optionsString;
3230
} else {
3331
// otherwise two spaces would appear between 'docker-compose' and 'up'
34-
return StringUtils.EMPTY;
32+
return "";
3533
}
3634
}
3735
}

core/src/main/java/org/testcontainers/containers/ComposeContainer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ public void stop() {
171171
}
172172
this.composeDelegate.runWithCompose(this.localCompose, cmd, this.env, this.filesInDirectory);
173173
} finally {
174+
this.composeDelegate.clear();
174175
this.project = this.composeDelegate.randomProjectId();
175176
}
176177
}

0 commit comments

Comments
 (0)