Skip to content

Commit d6ba1fa

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/download-artifact-4.1.8
2 parents d58b8b0 + d872060 commit d6ba1fa

File tree

465 files changed

+16221
-9348
lines changed

Some content is hidden

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

465 files changed

+16221
-9348
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// README at: https://github.com/devcontainers/templates/tree/main/src/go
33
{
44
"name": "Go",
5-
"image": "mcr.microsoft.com/devcontainers/go:1.21-bookworm",
5+
"image": "mcr.microsoft.com/devcontainers/go:1.22-bookworm",
66

77
// Features to add to the dev container. More info: https://containers.dev/features.
88
// "features": {},

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: sudo rm -rf /var/run/docker.sock
6363

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

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

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

88+
- name: generate
89+
if: ${{ inputs.platform == 'ubuntu-latest' }}
90+
working-directory: ./${{ inputs.project-directory }}
91+
shell: bash
92+
run: |
93+
make generate
94+
git --no-pager diff && [[ 0 -eq $(git status --porcelain | wc -l) ]]
95+
8896
- name: modVerify
8997
working-directory: ./${{ inputs.project-directory }}
9098
run: go mod verify
9199

92100
- name: modTidy
101+
if: ${{ inputs.platform == 'ubuntu-latest' }}
93102
working-directory: ./${{ inputs.project-directory }}
94-
run: make tidy
103+
shell: bash
104+
run: |
105+
make tidy
106+
git --no-pager diff && [[ 0 -eq $(git status --porcelain | wc -l) ]]
95107
96108
- name: ensure compilation
97109
working-directory: ./${{ inputs.project-directory }}

.github/workflows/ci-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
})
2525
2626
- name: Checkout
27-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2828
with:
2929
token: ${{ secrets.GITHUB_TOKEN }}
3030
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
strategy:
2828
matrix:
29-
go-version: [1.21.x, 1.x]
29+
go-version: [1.22.x, 1.x]
3030
platform: [ubuntu-latest, macos-latest]
3131
uses: ./.github/workflows/ci-test-go.yml
3232
with:
@@ -44,7 +44,7 @@ jobs:
4444
name: "Test with reaper off"
4545
strategy:
4646
matrix:
47-
go-version: [1.21.x, 1.x]
47+
go-version: [1.22.x, 1.x]
4848
uses: ./.github/workflows/ci-test-go.yml
4949
with:
5050
go-version: ${{ matrix.go-version }}
@@ -61,7 +61,7 @@ jobs:
6161
name: "Test with Rootless Docker"
6262
strategy:
6363
matrix:
64-
go-version: [1.21.x, 1.x]
64+
go-version: [1.22.x, 1.x]
6565
platform: [ubuntu-latest]
6666
uses: ./.github/workflows/ci-test-go.yml
6767
with:
@@ -76,7 +76,7 @@ jobs:
7676
test-module-generator:
7777
strategy:
7878
matrix:
79-
go-version: [1.21.x, 1.x]
79+
go-version: [1.22.x, 1.x]
8080
platform: [ubuntu-latest, macos-latest, windows-latest]
8181
uses: ./.github/workflows/ci-test-go.yml
8282
with:
@@ -92,9 +92,9 @@ jobs:
9292
needs: test
9393
strategy:
9494
matrix:
95-
go-version: [1.21.x, 1.x]
95+
go-version: [1.22.x, 1.x]
9696
platform: [ubuntu-latest]
97-
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]
97+
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]
9898
uses: ./.github/workflows/ci-test-go.yml
9999
with:
100100
go-version: ${{ matrix.go-version }}
@@ -112,7 +112,7 @@ jobs:
112112
module: [nginx, toxiproxy]
113113
uses: ./.github/workflows/ci-test-go.yml
114114
with:
115-
go-version: "1.21.x"
115+
go-version: "1.22.x"
116116
fail-fast: true
117117
platform: 'ubuntu-latest'
118118
project-directory: examples/${{ matrix.module }}
@@ -129,7 +129,7 @@ jobs:
129129
runs-on: ubuntu-latest
130130
steps:
131131
- name: Check out code into the Go module directory
132-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
132+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
133133
with:
134134
# Disabling shallow clone is recommended for improving relevancy of reporting
135135
fetch-depth: 0

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ jobs:
4949

5050
steps:
5151
- name: Checkout repository
52-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
52+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
5353

5454
# Initializes the CodeQL tools for scanning.
5555
- name: Initialize CodeQL
56-
uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
56+
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
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@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
70+
uses: github/codeql-action/autobuild@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
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@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
83+
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
8484
with:
8585
category: "/language:${{matrix.language}}"

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

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@ jobs:
1010
strategy:
1111
matrix:
1212
rootless-docker: [true, false]
13+
containerd-integration: [true, false]
14+
# ghaction-setup-docker doesn't work with rootless yet
15+
exclude:
16+
- rootless-docker: true
17+
containerd-integration: true
18+
1319
name: "Core tests using latest moby/moby"
1420
runs-on: 'ubuntu-latest'
1521
continue-on-error: true
1622
steps:
1723
- name: Set the Docker Install type
1824
run: |
1925
echo "docker_install_type=${{ matrix.rootless-docker == true && 'Rootless' || 'Rootful' }}" >> "$GITHUB_ENV"
26+
echo "containerd_integration=${{ matrix.containerd-integration == true && 'containerd' || '' }}" >> "$GITHUB_ENV"
2027
2128
- name: Setup rootless Docker
2229
if: ${{ matrix.rootless-docker }}
@@ -27,7 +34,7 @@ jobs:
2734
run: sudo rm -rf /var/run/docker.sock
2835

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

3239
- name: Set up Go
3340
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
@@ -42,7 +49,22 @@ jobs:
4249
- name: modTidy
4350
run: go mod tidy
4451

45-
- name: Install Latest Docker
52+
- name: Install Nightly Docker
53+
# rootless not supported with ghaction-setup-docker yet
54+
if: ${{ matrix.rootless-docker == false }}
55+
uses: crazy-max/ghaction-setup-docker@master
56+
with:
57+
daemon-config: |
58+
{
59+
"debug": true,
60+
"features": {
61+
"containerd-snapshotter": ${{ matrix.containerd-integration }}
62+
}
63+
}
64+
version: type=image,tag=master
65+
66+
- name: Install test Docker
67+
if: ${{ matrix.rootless-docker }}
4668
run: curl https://get.docker.com | CHANNEL=test sh
4769

4870
- name: go test
@@ -56,6 +78,7 @@ jobs:
5678
{
5779
"tc_project": "testcontainers-go",
5880
"tc_docker_install_type": "${docker_install_type}",
81+
"tc_containerd_integration": "${containerd_integration}",
5982
"tc_github_action_url": "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/attempts/${GITHUB_RUN_ATTEMPT}",
6083
"tc_github_action_status": "FAILED",
6184
"tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}"

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
pull-requests: write # for release-drafter/release-drafter to add label to PR
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: release-drafter/release-drafter@09c613e259eb8d4e7c81c2cb00618eb5fc4575a7 # v5.19.0
19+
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v5.19.0
2020
env:
2121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/scorecards.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: "Checkout code"
23-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
23+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
2424
with:
2525
persist-credentials: false
2626

@@ -51,6 +51,6 @@ jobs:
5151

5252
# required for Code scanning alerts
5353
- name: "Upload SARIF results to code scanning"
54-
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
54+
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
5555
with:
5656
sarif_file: results.sarif

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ TEST-*.xml
1414

1515
tcvenv
1616

17-
**/go.work
17+
**/go.work
18+
19+
# VS Code settings
20+
.vscode

.golangci.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
linters:
22
enable:
3+
- errcheck
34
- errorlint
45
- gci
56
- gocritic
67
- gofumpt
78
- misspell
8-
- nonamedreturns
9+
- nolintlint
10+
- nakedret
11+
- perfsprint
912
- testifylint
10-
- errcheck
13+
- thelper
14+
- usestdlibvars
1115

1216
linters-settings:
17+
nakedret:
18+
max-func-lines: 0
1319
errorlint:
1420
# Check whether fmt.Errorf uses the %w verb for formatting errors.
1521
# See the https://github.com/polyfloyd/go-errorlint for caveats.
@@ -29,16 +35,6 @@ linters-settings:
2935
disable:
3036
- float-compare
3137
- go-require
32-
enable:
33-
- bool-compare
34-
- compares
35-
- empty
36-
- error-is-as
37-
- error-nil
38-
- expected-actual
39-
- len
40-
- require-error
41-
- suite-dont-use-pkg
42-
- suite-extra-assert-call
38+
enable-all: true
4339
run:
4440
timeout: 5m

0 commit comments

Comments
 (0)