Skip to content

Commit fd3c7b6

Browse files
committed
Merge branch 'main' into feature/reusable-couchbase-containers
* main: (76 commits) chore(deps): bump mkdocs-include-markdown-plugin from 6.2.2 to 7.1.5 (testcontainers#3137) chore(deps): bump github.com/shirou/gopsutil/v4 from 4.25.1 to 4.25.4 (testcontainers#3133) chore(deps): bump github.com/docker/docker from 28.0.1+incompatible to 28.1.1+incompatible (testcontainers#3152) feat(memcached): add memcached module (testcontainers#3132) fix(etcd): single node etcd cluster access (testcontainers#3149) feat(valkey): add TLS support for Valkey (testcontainers#3131) fix(dockermodelrunner): wait for the model to be pulled (testcontainers#3125) fix(localstack): remove checksum before parsing version (testcontainers#3130) fix(dockermodelrunner): dependency with socat chore: prepare for next minor development cycle (0.38.0) chore: use new version (v0.37.0) in modules and examples fix: handle stopped containers more gracefully when reuse is enabled (testcontainers#3062) feat(gcloud): add option to run firestore in datastore mode (testcontainers#3009) feat: support for mounting images (testcontainers#3044) chore(ci): close PR if it was sent from main (testcontainers#3123) feat: add `WithReuseByName` for modifying Generic Container Requests (testcontainers#3064) chore(deps): bump github/codeql-action from 3.28.15 to 3.28.16 (testcontainers#3120) chore(deps): bump mkdocs-include-markdown-plugin from 6.2.2 to 7.1.5 (testcontainers#3119) chore(deps): bump github.com/magiconair/properties from 1.8.9 to 1.8.10 (testcontainers#3118) chore(ci): exclude more files for a full-blown build (testcontainers#3122) ...
2 parents 90603ed + d042367 commit fd3c7b6

File tree

362 files changed

+14963
-3783
lines changed

Some content is hidden

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

362 files changed

+14963
-3783
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ updates:
1414
directories:
1515
- /
1616
- /examples/nginx
17-
- /examples/toxiproxy
1817
- /modulegen
18+
- /modules/aerospike
19+
- /modules/arangodb
1920
- /modules/artemis
21+
- /modules/azure
2022
- /modules/azurite
2123
- /modules/cassandra
2224
- /modules/chroma
@@ -27,6 +29,7 @@ updates:
2729
- /modules/couchbase
2830
- /modules/databend
2931
- /modules/dind
32+
- /modules/dockermodelrunner
3033
- /modules/dolt
3134
- /modules/dynamodb
3235
- /modules/elasticsearch
@@ -41,6 +44,7 @@ updates:
4144
- /modules/localstack
4245
- /modules/mariadb
4346
- /modules/meilisearch
47+
- /modules/memcached
4448
- /modules/milvus
4549
- /modules/minio
4650
- /modules/mockserver
@@ -62,7 +66,9 @@ updates:
6266
- /modules/redpanda
6367
- /modules/registry
6468
- /modules/scylladb
69+
- /modules/socat
6570
- /modules/surrealdb
71+
- /modules/toxiproxy
6672
- /modules/valkey
6773
- /modules/vault
6874
- /modules/vearch

.github/workflows/ci-lint-go.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ jobs:
2424
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525

2626
- name: Set up Go
27-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
27+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
2828
with:
2929
go-version-file: "${{ inputs.project-directory == '' && '.' || inputs.project-directory }}/go.mod"
3030
cache-dependency-path: "${{ inputs.project-directory == '' && '.' || inputs.project-directory }}/go.sum"
3131
id: go
3232

3333
- name: golangci-lint
34-
uses: golangci/golangci-lint-action@e60da84bfae8c7920a47be973d75e15710aa8bd7 # v6.3.0
34+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
3535
with:
3636
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
37-
version: v1.63.4
37+
version: v2.0.2
3838
# Optional: working directory, useful for monorepos
3939
working-directory: ${{ inputs.project-directory }}
4040

.github/workflows/ci-test-go.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
type: string
1919
default: "."
2020
description: "The directory where the Go project is located."
21+
testcontainers-cloud:
22+
required: false
23+
type: boolean
24+
default: false
25+
description: "Run the tests on Testcontainers Cloud"
2126
rootless-docker:
2227
required: false
2328
type: boolean
@@ -50,7 +55,7 @@ jobs:
5055
steps:
5156
- name: Setup rootless Docker
5257
if: ${{ inputs.rootless-docker }}
53-
uses: docker/setup-docker-action@c2d73c1a11a9b44be6d855121d75c3e0dac814c1 # v4
58+
uses: docker/setup-docker-action@b60f85385d03ac8acfca6d9996982511d8620a19 # v4
5459
with:
5560
rootless: true
5661

@@ -61,15 +66,15 @@ jobs:
6166
fetch-depth: 0
6267

6368
- name: Set up Go
64-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
69+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
6570
with:
6671
go-version: '${{ inputs.go-version }}'
6772
cache-dependency-path: '${{ inputs.project-directory }}/go.sum'
6873
id: go
6974

7075
- name: ensure compilation
7176
working-directory: ./${{ inputs.project-directory }}
72-
run: go build
77+
run: go build ./...
7378

7479
- name: Install dependencies
7580
shell: bash
@@ -81,6 +86,13 @@ jobs:
8186
echo "No dependencies script found at $SCRIPT_PATH - skipping installation"
8287
fi
8388
89+
# Setup Testcontainers Cloud Client right before your Testcontainers tests
90+
- name: Setup Testcontainers Cloud Client
91+
if: ${{ inputs.testcontainers-cloud }}
92+
uses: atomicjar/testcontainers-cloud-setup-action@c335bdbb570ec7c48f72c7d450c077f0a002293e # v1.3
93+
with:
94+
token: ${{ secrets.TCC_TOKEN }}
95+
8496
- name: go test
8597
working-directory: ./${{ inputs.project-directory }}
8698
timeout-minutes: 30
@@ -90,6 +102,13 @@ jobs:
90102
run: |
91103
./scripts/check_environment.sh
92104
105+
# (Optionally) When you don't need Testcontainers Cloud anymore, you could terminate sessions eagerly
106+
- name: Terminate Testcontainers Cloud Client active sessions
107+
if: ${{ inputs.testcontainers-cloud }}
108+
uses: atomicjar/testcontainers-cloud-setup-action@c335bdbb570ec7c48f72c7d450c077f0a002293e # v1.3
109+
with:
110+
action: terminate
111+
93112
- name: Test Summary
94113
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
95114
with:
@@ -125,7 +144,7 @@ jobs:
125144
126145
- name: SonarQube Scan
127146
if: ${{ env.SHOULD_RUN_SONAR == 'true' }}
128-
uses: SonarSource/sonarqube-scan-action@0303d6b62e310685c0e34d0b9cde218036885c4d # v5.0.0
147+
uses: SonarSource/sonarqube-scan-action@aa494459d7c39c106cc77b166de8b4250a32bb97 # v5.1.0
129148
env:
130149
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
131150
with:

.github/workflows/ci-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
ref: ${{ github.event.client_payload.pull_request.head.ref }}
3232

3333
- name: Set up Go
34-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
34+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
3535
with:
3636
go-version-file: go.mod
3737
id: go

.github/workflows/ci.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
- id: changed-files
2424
name: Get changed files
25-
uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4
25+
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46.0.3
2626

2727
- id: set-modified-modules
2828
name: Set all modified modules
@@ -71,10 +71,31 @@ jobs:
7171
go-version: ${{ matrix.go-version }}
7272
platforms: ${{ matrix.module == 'modulegen' && '["ubuntu-latest", "macos-latest", "windows-latest"]' || '["ubuntu-latest"]' }}
7373
project-directory: "${{ matrix.module }}"
74+
testcontainers-cloud: false
7475
rootless-docker: false
7576
ryuk-disabled: false
7677
secrets: inherit
7778

79+
# The job below is a copy of the job above, but using Docker Cloud.
80+
test-testcontainers-cloud:
81+
# the core module is identified by the empty string (the root path)
82+
if: ${{ contains(fromJSON(needs.detect-modules.outputs.modules), '') }}
83+
needs:
84+
- detect-modules
85+
- lint
86+
name: "Test using Testcontainers Cloud"
87+
strategy:
88+
matrix:
89+
go-version: [1.23.x, 1.24.x]
90+
uses: ./.github/workflows/ci-test-go.yml
91+
with:
92+
go-version: ${{ matrix.go-version }}
93+
platforms: '["ubuntu-latest"]'
94+
project-directory: "."
95+
testcontainers-cloud: true
96+
rootless-docker: false
97+
ryuk-disabled: false
98+
7899
# The job below is a copy of the job above, but with ryuk disabled.
79100
# It's executed in the first stage to avoid concurrency issues.
80101
test-reaper-off:
@@ -92,6 +113,7 @@ jobs:
92113
go-version: ${{ matrix.go-version }}
93114
platforms: '["ubuntu-latest"]'
94115
project-directory: "."
116+
testcontainers-cloud: false
95117
rootless-docker: false
96118
ryuk-disabled: true
97119

@@ -112,6 +134,7 @@ jobs:
112134
go-version: ${{ matrix.go-version }}
113135
platforms: '["ubuntu-latest"]'
114136
project-directory: "."
137+
testcontainers-cloud: false
115138
rootless-docker: true
116139
ryuk-disabled: false
117140

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
strategy:
4242
fail-fast: false
4343
matrix:
44-
language: [ 'go', 'javascript']
44+
language: [ 'go' ]
4545
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
4646
# Use only 'java' to analyze code written in Java, Kotlin or both
4747
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
@@ -53,7 +53,7 @@ jobs:
5353

5454
# Initializes the CodeQL tools for scanning.
5555
- name: Initialize CodeQL
56-
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
56+
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
5757
with:
5858
languages: ${{ matrix.language }}
5959
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -67,7 +67,7 @@ jobs:
6767
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6868
# If this step fails, then you should remove it and run the build manually (see below)
6969
- name: Autobuild
70-
uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
70+
uses: github/codeql-action/autobuild@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
7171

7272
# ℹ️ Command-line programs to run using the OS shell.
7373
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -80,6 +80,6 @@ jobs:
8080
# ./location_of_script_within_repo/buildscript.sh
8181

8282
- name: Perform CodeQL Analysis
83-
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
83+
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
8484
with:
8585
category: "/language:${{matrix.language}}"

.github/workflows/conventions.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,11 @@ jobs:
4747
docs
4848
chore
4949
deps
50+
51+
- name: Detect if the Pull Request was sent from the main branch
52+
if: "${{ github.head_ref == 'main' }}"
53+
env:
54+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
run: |
56+
gh pr close --comment "This Pull Request has been automatically closed because it was sent from the fork's main branch. Please use a different branch so that the maintainers can contribute to your Pull Request."
57+
exit 1

.github/workflows/docker-projects-latest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626

2727
- name: Set up Go
28-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
28+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
2929
with:
3030
go-version-file: 'go.mod'
3131
cache-dependency-path: 'go.sum'
@@ -67,7 +67,7 @@ jobs:
6767
- name: Notify to Slack on failures
6868
if: failure()
6969
id: slack
70-
uses: slackapi/[email protected]
70+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
7171
with:
7272
payload-templated: true
7373
payload-file-path: "./payload-slack-content.json"
@@ -91,7 +91,7 @@ jobs:
9191
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9292

9393
- name: Set up Go
94-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
94+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
9595
with:
9696
go-version-file: 'modules/compose/go.mod'
9797
cache-dependency-path: 'modules/compose/go.sum'
@@ -127,7 +127,7 @@ jobs:
127127
- name: Notify to Slack on failures
128128
if: failure()
129129
id: slack
130-
uses: slackapi/[email protected]
130+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d #v2.0.0
131131
with:
132132
payload-templated: true
133133
payload-file-path: "./payload-slack-content.json"

.github/workflows/scorecards.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ jobs:
4343
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
4444
# format to the repository Actions tab.
4545
- name: "Upload artifact"
46-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
46+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4747
with:
4848
name: SARIF file
4949
path: results.sarif
5050
retention-days: 5
5151

5252
# required for Code scanning alerts
5353
- name: "Upload SARIF results to code scanning"
54-
uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
54+
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
5555
with:
5656
sarif_file: results.sarif

.github/workflows/sonar-bulk-operations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
bulk-operation:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919

2020
- name: Execute Bulk Operation
2121
env:

.github/workflows/sonar-create-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
create-project:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

1717
- name: Create Sonar Project for module
1818
env:

.github/workflows/sonar-delete-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
delete-project:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

1717
- name: Delete Sonar Project for module
1818
env:

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ src/pip-delete-this-directory.txt
1313

1414
TEST-*.xml
1515

16-
tcvenv
17-
1816
**/go.work
1917

2018
# VS Code settings

0 commit comments

Comments
 (0)