Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/download-a…
Browse files Browse the repository at this point in the history
…rtifact-4.1.8
  • Loading branch information
stevenh authored Nov 11, 2024
2 parents d58b8b0 + d872060 commit d6ba1fa
Show file tree
Hide file tree
Showing 465 changed files with 16,221 additions and 9,348 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
"image": "mcr.microsoft.com/devcontainers/go:1.21-bookworm",
"image": "mcr.microsoft.com/devcontainers/go:1.22-bookworm",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: sudo rm -rf /var/run/docker.sock

- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
Expand All @@ -73,10 +73,10 @@ jobs:

- name: golangci-lint
if: ${{ inputs.platform == 'ubuntu-latest' }}
uses: golangci/golangci-lint-action@9d1e0624a798bb64f6c3cea93db47765312263dc # v5
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.59.1
version: v1.61.0
# Optional: working directory, useful for monorepos
working-directory: ${{ inputs.project-directory }}
# Optional: golangci-lint command line arguments.
Expand All @@ -85,13 +85,25 @@ jobs:
# takes precedence over all other caching options.
skip-cache: true

- name: generate
if: ${{ inputs.platform == 'ubuntu-latest' }}
working-directory: ./${{ inputs.project-directory }}
shell: bash
run: |
make generate
git --no-pager diff && [[ 0 -eq $(git status --porcelain | wc -l) ]]
- name: modVerify
working-directory: ./${{ inputs.project-directory }}
run: go mod verify

- name: modTidy
if: ${{ inputs.platform == 'ubuntu-latest' }}
working-directory: ./${{ inputs.project-directory }}
run: make tidy
shell: bash
run: |
make tidy
git --no-pager diff && [[ 0 -eq $(git status --porcelain | wc -l) ]]
- name: ensure compilation
working-directory: ./${{ inputs.project-directory }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
})
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.21.x, 1.x]
go-version: [1.22.x, 1.x]
platform: [ubuntu-latest, macos-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
Expand All @@ -44,7 +44,7 @@ jobs:
name: "Test with reaper off"
strategy:
matrix:
go-version: [1.21.x, 1.x]
go-version: [1.22.x, 1.x]
uses: ./.github/workflows/ci-test-go.yml
with:
go-version: ${{ matrix.go-version }}
Expand All @@ -61,7 +61,7 @@ jobs:
name: "Test with Rootless Docker"
strategy:
matrix:
go-version: [1.21.x, 1.x]
go-version: [1.22.x, 1.x]
platform: [ubuntu-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
Expand All @@ -76,7 +76,7 @@ jobs:
test-module-generator:
strategy:
matrix:
go-version: [1.21.x, 1.x]
go-version: [1.22.x, 1.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
uses: ./.github/workflows/ci-test-go.yml
with:
Expand All @@ -92,9 +92,9 @@ jobs:
needs: test
strategy:
matrix:
go-version: [1.21.x, 1.x]
go-version: [1.22.x, 1.x]
platform: [ubuntu-latest]
module: [artemis, azurite, cassandra, chroma, clickhouse, cockroachdb, compose, consul, couchbase, dolt, elasticsearch, gcloud, inbucket, influxdb, k3s, k6, kafka, localstack, mariadb, milvus, minio, mockserver, mongodb, mssql, mysql, nats, neo4j, ollama, openfga, openldap, opensearch, postgres, pulsar, qdrant, rabbitmq, redis, redpanda, registry, surrealdb, valkey, vault, vearch, weaviate]
module: [artemis, azurite, cassandra, chroma, clickhouse, cockroachdb, compose, consul, couchbase, databend, dolt, dynamodb, elasticsearch, etcd, gcloud, grafana-lgtm, inbucket, influxdb, k3s, k6, kafka, localstack, mariadb, meilisearch, milvus, minio, mockserver, mongodb, mssql, mysql, nats, neo4j, ollama, openfga, openldap, opensearch, postgres, pulsar, qdrant, rabbitmq, redis, redpanda, registry, surrealdb, valkey, vault, vearch, weaviate, yugabytedb]
uses: ./.github/workflows/ci-test-go.yml
with:
go-version: ${{ matrix.go-version }}
Expand All @@ -112,7 +112,7 @@ jobs:
module: [nginx, toxiproxy]
uses: ./.github/workflows/ci-test-go.yml
with:
go-version: "1.21.x"
go-version: "1.22.x"
fail-fast: true
platform: 'ubuntu-latest'
project-directory: examples/${{ matrix.module }}
Expand All @@ -129,7 +129,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -67,7 +67,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
uses: github/codeql-action/autobuild@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
category: "/language:${{matrix.language}}"
27 changes: 25 additions & 2 deletions .github/workflows/docker-moby-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ jobs:
strategy:
matrix:
rootless-docker: [true, false]
containerd-integration: [true, false]
# ghaction-setup-docker doesn't work with rootless yet
exclude:
- rootless-docker: true
containerd-integration: true

name: "Core tests using latest moby/moby"
runs-on: 'ubuntu-latest'
continue-on-error: true
steps:
- name: Set the Docker Install type
run: |
echo "docker_install_type=${{ matrix.rootless-docker == true && 'Rootless' || 'Rootful' }}" >> "$GITHUB_ENV"
echo "containerd_integration=${{ matrix.containerd-integration == true && 'containerd' || '' }}" >> "$GITHUB_ENV"
- name: Setup rootless Docker
if: ${{ matrix.rootless-docker }}
Expand All @@ -27,7 +34,7 @@ jobs:
run: sudo rm -rf /var/run/docker.sock

- name: Check out code into the Go module directory
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
Expand All @@ -42,7 +49,22 @@ jobs:
- name: modTidy
run: go mod tidy

- name: Install Latest Docker
- name: Install Nightly Docker
# rootless not supported with ghaction-setup-docker yet
if: ${{ matrix.rootless-docker == false }}
uses: crazy-max/ghaction-setup-docker@master
with:
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": ${{ matrix.containerd-integration }}
}
}
version: type=image,tag=master

- name: Install test Docker
if: ${{ matrix.rootless-docker }}
run: curl https://get.docker.com | CHANNEL=test sh

- name: go test
Expand All @@ -56,6 +78,7 @@ jobs:
{
"tc_project": "testcontainers-go",
"tc_docker_install_type": "${docker_install_type}",
"tc_containerd_integration": "${containerd_integration}",
"tc_github_action_url": "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/attempts/${GITHUB_RUN_ATTEMPT}",
"tc_github_action_status": "FAILED",
"tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
pull-requests: write # for release-drafter/release-drafter to add label to PR
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@09c613e259eb8d4e7c81c2cb00618eb5fc4575a7 # v5.19.0
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v5.19.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
persist-credentials: false

Expand Down Expand Up @@ -51,6 +51,6 @@ jobs:

# required for Code scanning alerts
- name: "Upload SARIF results to code scanning"
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
sarif_file: results.sarif
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ TEST-*.xml

tcvenv

**/go.work
**/go.work

# VS Code settings
.vscode
22 changes: 9 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
linters:
enable:
- errcheck
- errorlint
- gci
- gocritic
- gofumpt
- misspell
- nonamedreturns
- nolintlint
- nakedret
- perfsprint
- testifylint
- errcheck
- thelper
- usestdlibvars

linters-settings:
nakedret:
max-func-lines: 0
errorlint:
# Check whether fmt.Errorf uses the %w verb for formatting errors.
# See the https://github.com/polyfloyd/go-errorlint for caveats.
Expand All @@ -29,16 +35,6 @@ linters-settings:
disable:
- float-compare
- go-require
enable:
- bool-compare
- compares
- empty
- error-is-as
- error-nil
- expected-actual
- len
- require-error
- suite-dont-use-pkg
- suite-extra-assert-call
enable-all: true
run:
timeout: 5m
11 changes: 11 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
quiet: True
disable-version-string: True
with-expecter: True
mockname: "mock{{.InterfaceName}}"
filename: "{{ .InterfaceName | lower }}_mock_test.go"
outpkg: "{{.PackageName}}_test"
dir: "{{.InterfaceDir}}"
packages:
github.com/testcontainers/testcontainers-go/wait:
interfaces:
StrategyTarget:
24 changes: 24 additions & 0 deletions .vscode/.testcontainers-go.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,34 @@
"name": "module / couchbase",
"path": "../modules/couchbase"
},
{
"name": "module / databend",
"path": "../modules/databend"
},
{
"name": "module / dolt",
"path": "../modules/dolt"
},
{
"name": "module / dynamodb",
"path": "../modules/dynamodb"
},
{
"name": "module / elasticsearch",
"path": "../modules/elasticsearch"
},
{
"name": "module / etcd",
"path": "../modules/etcd"
},
{
"name": "module / gcloud",
"path": "../modules/gcloud"
},
{
"name": "module / grafana-lgtm",
"path": "../modules/grafana-lgtm"
},
{
"name": "module / inbucket",
"path": "../modules/inbucket"
Expand Down Expand Up @@ -89,6 +105,10 @@
"name": "module / mariadb",
"path": "../modules/mariadb"
},
{
"name": "module / meilisearch",
"path": "../modules/meilisearch"
},
{
"name": "module / milvus",
"path": "../modules/milvus"
Expand Down Expand Up @@ -185,6 +205,10 @@
"name": "module / weaviate",
"path": "../modules/weaviate"
},
{
"name": "module / yugabytedb",
"path": "../modules/yugabytedb"
},
{
"name": "modulegen",
"path": "../modulegen"
Expand Down
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ verify_ssl = true
[packages]
mkdocs = "==1.5.3"
mkdocs-codeinclude-plugin = "==0.2.1"
mkdocs-include-markdown-plugin = "==6.2.1"
mkdocs-include-markdown-plugin = "==6.2.2"
mkdocs-material = "==9.5.18"
mkdocs-markdownextradata-plugin = "==0.2.5"
mkdocs-markdownextradata-plugin = "==0.2.6"

[requires]
python_version = "3.8"
Loading

0 comments on commit d6ba1fa

Please sign in to comment.