Skip to content

Commit 1bc4c20

Browse files
authored
Merge branch 'testcontainers:main' into main
2 parents 67e4c16 + 8ce2045 commit 1bc4c20

File tree

37 files changed

+122
-95
lines changed

37 files changed

+122
-95
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/java-8
33
{
4-
"name": "Java 8",
5-
"image": "mcr.microsoft.com/devcontainers/java:1-8-bullseye",
4+
"name": "Java 17",
5+
"image": "mcr.microsoft.com/devcontainers/java:0-17",
66

77
// Configure tool-specific properties.
88
"customizations": {
99
// Configure properties specific to VS Code.
1010
"vscode": {
11-
// Set *default* container specific settings.json values on container create.
12-
"settings": {
13-
"java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current",
14-
"java.configuration.runtimes": [{
15-
"default": true,
16-
"name": "JavaSE-1.8",
17-
"path": "/usr/local/sdkman/candidates/java/current"
18-
}]
19-
},
20-
2111
// Add the IDs of extensions you want installed when the container is created.
2212
"extensions": [
2313
"vscjava.vscode-java-pack"

.github/actions/setup-build/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
name: Set up Build
22
description: Sets up Build
3+
inputs:
4+
java-version:
5+
description: 'The Java version to set up'
6+
required: true
7+
default: '17'
38
runs:
49
using: "composite"
510
steps:
611
- uses: ./.github/actions/setup-java
12+
with:
13+
java-version: ${{ inputs.java-version }}
714
- name: Clear existing docker image cache
815
shell: bash
916
run: docker image prune -af
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
name: Set up Java
22
description: Sets up Java version
3+
inputs:
4+
java-version:
5+
description: 'The Java version to set up'
6+
required: true
7+
default: '17'
38
runs:
49
using: "composite"
510
steps:
611
- uses: actions/setup-java@v4
712
with:
8-
java-version: '8'
13+
java-version: ${{ inputs.java-version }}
914
distribution: temurin

.github/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ branches:
400400
# Required. Require branches to be up to date before merging.
401401
strict: true
402402
# Required. The list of status checks to require in order to merge into this branch
403-
contexts: ["core", "check_docs_examples (:docs:examples:check)", "in-docker_test", "ci/circleci: minimal_core", "test"]
403+
contexts: ["core (17)", "core (21)", "check_docs_examples (:docs:examples:check)", "in-docker_test", "ci/circleci: minimal_core", "test"]
404404
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
405405
enforce_admins: false
406406
# Prevent merge commits from being pushed to matching branches

.github/workflows/ci-docker-wormhole.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ jobs:
5353
-v "$PWD:$PWD" \
5454
-w "$PWD" \
5555
-e AUTO_APPLY_GIT_HOOKS=false \
56-
openjdk:8-jdk-alpine \
56+
eclipse-temurin:17-jdk-alpine \
5757
./gradlew --no-daemon --continue --scan testcontainers:test --tests '*GenericContainerRuleTest'

.github/workflows/ci-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
checks: write
5454
steps:
5555
- uses: actions/checkout@v4
56+
- uses: ./.github/actions/setup-build
5657
- name: Build with Gradle
5758
run: ./gradlew.bat cleanTest testcontainers:test --no-daemon --continue --scan --no-build-cache
5859
- uses: ./.github/actions/setup-junit-report
@@ -82,6 +83,7 @@ jobs:
8283
token: ${{ secrets.GITHUB_TOKEN }}
8384
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
8485
ref: ${{ github.event.client_payload.pull_request.head.ref }}
86+
- uses: ./.github/actions/setup-build
8587
- name: Build with Gradle
8688
run: ./gradlew.bat cleanTest testcontainers:test --no-daemon --continue --scan --no-build-cache
8789
- uses: ./.github/actions/setup-junit-report

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,14 @@ jobs:
5050
runs-on: ubuntu-22.04
5151
permissions:
5252
checks: write
53+
strategy:
54+
matrix:
55+
java: [ '17', '21' ]
5356
steps:
5457
- uses: actions/checkout@v4
5558
- uses: ./.github/actions/setup-build
59+
with:
60+
java-version: ${{ matrix.java }}
5661
- name: Build and test with Gradle
5762
run: |
5863
./gradlew :testcontainers:check --no-daemon --continue --scan

.sdkmanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
3-
java=8.0.372-tem
3+
java=17.0.12-tem

build.gradle

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414
id 'io.franzbecker.gradle-lombok' version '5.0.0'
1515
id 'com.gradleup.shadow' version '8.3.0'
1616
id 'me.champeau.gradle.japicmp' version '0.4.3' apply false
17-
id 'com.diffplug.spotless' version '6.13.0' apply false
17+
id 'com.diffplug.spotless' version '6.22.0' apply false
1818
}
1919

2020
apply from: "$rootDir/gradle/ci-support.gradle"
@@ -26,6 +26,7 @@ captainHook {
2626
}
2727

2828
subprojects {
29+
apply plugin: 'java'
2930
apply plugin: 'java-library'
3031
apply plugin: 'idea'
3132
apply plugin: 'io.franzbecker.gradle-lombok'
@@ -35,9 +36,17 @@ subprojects {
3536

3637
group = "org.testcontainers"
3738

38-
sourceCompatibility = 1.8
39-
targetCompatibility = 1.8
40-
compileJava.options.encoding = 'UTF-8'
39+
java {
40+
toolchain {
41+
languageVersion = JavaLanguageVersion.of(17)
42+
}
43+
}
44+
45+
tasks.withType(JavaCompile) {
46+
options.release.set(8)
47+
options.encoding = 'UTF-8'
48+
}
49+
4150
compileTestJava.options.encoding = 'UTF-8'
4251
javadoc.options.encoding = 'UTF-8'
4352

@@ -126,7 +135,7 @@ subprojects {
126135
}
127136

128137
checkstyle {
129-
toolVersion = "9.3"
138+
toolVersion = "10.12.4"
130139
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
131140
}
132141
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
interface DockerCompose {
66
String ENV_PROJECT_NAME = "COMPOSE_PROJECT_NAME";
7+
78
String ENV_COMPOSE_FILE = "COMPOSE_FILE";
89

910
DockerCompose withCommand(String cmd);

0 commit comments

Comments
 (0)