Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/dependabot-2.0.json
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
version: 2

# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
updates:
- package-ecosystem: github-actions
open-pull-requests-limit: 1
commit-message: { prefix: 'chore(deps)' }
commit-message: { prefix: sec(gha) }
open-pull-requests-limit: 0
directory: '/'
schedule:
interval: daily
groups:
security:
applies-to: security-updates
group-by: dependency-name
patterns: [ '*' ]
cooldown:
default-days: 3

- package-ecosystem: gomod
open-pull-requests-limit: 1
commit-message: { prefix: 'sec(deps)' }
commit-message: { prefix: sec(gomod) }
open-pull-requests-limit: 0
directories: [ '**/*' ]
schedule:
interval: daily
groups:
security:
applies-to: security-updates
update-types: [ minor, patch ]
ignore:
- dependency-name: '*'
update-types: [ 'version-update:semver-major' ]
group-by: dependency-name
patterns: [ '*' ]
cooldown:
default-days: 3

- package-ecosystem: npm
commit-message: { prefix: sec(npm) }
open-pull-requests-limit: 0
directory: '/docs'
schedule:
interval: daily
groups:
security:
applies-to: security-updates
group-by: dependency-name
patterns: [ '*' ]
cooldown:
default-days: 3
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
### Description

<!-- Briefly describe what this PR does -->
<!-- Required: One-line summary of what the PR is about -->

### Type of Change

<!-- Check the relevant option -->
<!-- Required: Check the relevant option, keep unselected ones -->

- [ ] πŸ› Bug fix
- [ ] ✨ New feature
- [ ] πŸ’₯ Breaking change
- [ ] πŸ“ Documentation
- [ ] ♻️ Refactoring
- [ ] ⚑ Performance
- [ ] πŸƒβ€βž‘οΈ Performance
- [ ] βœ… Tests
- [ ] πŸ” Security
- [ ] πŸ”§ Build/CI

### Related Issue
### Related Issues

<!-- Link related issues: Fixes #123, Closes #456 -->
<!-- Optional: List of links to related issues: Fixes #123, Closes #456 -->

### Changes

<!-- List key changes -->
<!-- Optional: List of one-line key changes -->

### Checklist

Expand All @@ -31,6 +31,6 @@
- [ ] I have commented on my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.

### Notes
#### Notes

<!-- Optional: Add additional context -->
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ on:
- v*.*.*
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
docs:
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ on:
tags:
- v*.*.*
workflow_dispatch:
inputs:
tag:
description: Release tag
required: true

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write # goreleaser creates GitHub release + uploads artifacts
steps:
Expand All @@ -35,3 +44,6 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create submodule tags
run: make tag.submodules TAG=${{ github.event.inputs.tag || github.ref_name }}
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ permissions:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# https://github.com/actions/checkout/releases
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
12 changes: 7 additions & 5 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2

builds:
- skip: true
project_name: testcontainers-go

release:
prerelease: auto

changelog:
use: github-native

builds:
- skip: true

archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
files: [ LICENSE, README.md ]

changelog:
use: github-native
17 changes: 15 additions & 2 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#:schema https://mise.jdx.dev/schema/mise.json

[settings]
minimum_release_age = "3d"

[tools]
# https://mise-tools.jdx.dev/tools/actionlint
actionlint = "1.7.12"
# https://mise-tools.jdx.dev/tools/bun
bun = "1.3.14"
# https://mise-tools.jdx.dev/tools/lefthook
lefthook = "2.1.8"
# https://mise-tools.jdx.dev/tools/golangci-lint
golangci-lint = "2.12.2"
# https://mise-tools.jdx.dev/tools/goreleaser
goreleaser = "2.17.1"
# https://mise-tools.jdx.dev/tools/lefthook
lefthook = "2.1.10"
# https://github.com/oligot/go-mod-upgrade/releases
"github:oligot/go-mod-upgrade" = "0.12.0"
# https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck?tab=versions
"go:golang.org/x/vuln/cmd/govulncheck" = "1.6.0"
51 changes: 36 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,9 @@ endef
# --- Targets -----------------------------------------------------------------

# This allows us to accept extra arguments
%: go.work .mise .lefthook
%: .mise .lefthook go.work
@:

# Ensure file
go.work:
@echo "〉initializing go work"
@go work init
@go work use -r .
@go work sync

.PHONY: .mise
# Install dependencies
.mise:
Expand All @@ -36,11 +29,16 @@ endif
.lefthook:
@lefthook install --reset-hooks-path

# Ensure go.work file
go.work:
@echo "〉initializing go work"
@go work init && go work use -r . && go work sync

### Tasks

.PHONY: check
## Run lint & tests
check: tidy generate lint.fix test audit
check: tidy generate lint.fix test.race audit

.PHONY: lint
## Run linter
Expand All @@ -60,24 +58,31 @@ generate:
@echo "〉go generate"
@go generate work


.PHONY: test
## Run tests
test:
@echo "〉go test"
@GO_TEST_TAGS=-skip go test -tags=safe -coverprofile=coverage.out work
@GO_TEST_TAGS=-skip go test -tags=safe -shuffle=on -coverprofile=coverage.out work

.PHONY: test.race
## Run tests with -race
test.race:
@GO_TEST_TAGS=-skip go test -tags=safe -coverprofile=coverage.out -race work
@echo "〉go test with -race"
@GO_TEST_TAGS=-skip go test -tags=safe -shuffle=on -coverprofile=coverage.out -race work

.PHONY: test.update
## Run tests with -update
test.update:
@echo "〉go test with -update"
@GO_TEST_TAGS=-skip go test -tags=safe --shuffle=on coverprofile=coverage.out -update work

### Security

.PHONY: audit
## Run security audit
audit:
@echo "〉security audit"
@go install golang.org/x/vuln/cmd/govulncheck@latest
@$(foreach mod,$(GOMODS), (cd $(dir $(mod)) && echo "πŸ“‚ $(dir $(mod))" && govulncheck ./...) &&) true

### Dependencies
Expand All @@ -93,16 +98,27 @@ tidy:
## Show outdated direct dependencies
outdated:
@echo "〉go mod outdated"
@$(foreach mod,$(GOMODS), (cd $(dir $(mod)) && echo "πŸ“‚ $(dir $(mod))" && go list -u -m -json all | go-mod-outdated -update -direct) &&) true
@$(foreach mod,$(GOMODS), (cd $(dir $(mod)) && echo "πŸ“‚ $(dir $(mod))" && GOWORK=off go-mod-upgrade --list) &&) true

.PHONY: upgrade
## Show outdated direct dependencies
upgrade:
@echo "〉go mod upgrade"
@rm -f go.work go.work.sum
@$(foreach mod,$(GOMODS), (cd $(dir $(mod)) && echo "πŸ“‚ $(dir $(mod))" && go list -u -m -f '{{if and (not .Indirect) .Update}}{{.Path}}{{end}}' all | xargs -n1 -I{} go get {}@latest) &&) true
@$(foreach mod,$(GOMODS), (cd $(dir $(mod)) && echo "πŸ“‚ $(dir $(mod))" && GOWORK=off go-mod-upgrade) &&) true
@$(MAKE) tidy

### Release

.PHONY: tag.submodules
## Create tags for submodules TAG=1.0.0
tag.submodules:
@echo "$(TAG)" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$$' || { echo "❌ TAG must be vX.Y.Z format"; exit 1; }
@git rev-parse "$(TAG)" >/dev/null 2>&1 || { echo "❌ Tag $(TAG) does not exist"; exit 1; }
@echo "πŸ”– Creating submodule tags..."
@find . -type f -name 'go.mod' -mindepth 2 -not -path './vendor/*' -exec sh -c 'dir=$$(dirname {} | sed "s|^\./||"); tag="$$dir/$(TAG)"; git rev-parse "$$tag" >/dev/null 2>&1 || { echo "πŸ”– $$tag"; git tag "$$tag"; }' \;
@echo "πŸ”– Pushing tags..."
@git push origin --tags

### Documentation

.PHONY: docs
Expand All @@ -125,6 +141,11 @@ godocs:

### Utils

.PHONY: actionlint
## Run actionlint
actionlint:
@actionlint

.PHONY: help
# https://patorjk.com/software/taag/#p=display&f=Tmplr&t=testcontainers&x=none&v=4&h=4&w=80&we=false
## Show help text
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
| Module | Description | Import Path |
|----------|-----------------------------------------|-------------------------------------------------------|
| Temporal | Testcontainers integration for Temporal | `github.com/foomo/testcontainers-go/modules/temporal` |
| RustFS | Testcontainers integration for RustFS | `github.com/foomo/testcontainers-go/modules/rustfs` |

For documentation and usage examples, visit the [docs site](https://foomo.github.io/testcontainers-go/).

Expand Down
28 changes: 14 additions & 14 deletions modules/rustfs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ module github.com/foomo/testcontainers-go/modules/rustfs
go 1.26.3

require (
github.com/aws/aws-sdk-go-v2 v1.41.8
github.com/aws/aws-sdk-go-v2/credentials v1.19.18
github.com/aws/aws-sdk-go-v2/service/s3 v1.102.1
github.com/aws/aws-sdk-go-v2 v1.43.3
github.com/aws/aws-sdk-go-v2/credentials v1.19.33
github.com/aws/aws-sdk-go-v2/service/s3 v1.106.4
github.com/stretchr/testify v1.11.1
github.com/testcontainers/testcontainers-go v0.42.0
github.com/testcontainers/testcontainers-go v0.43.0
)

require (
dario.cat/mergo v1.0.2 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.25 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.17 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.24 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.24 // indirect
github.com/aws/smithy-go v1.25.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.16 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.35 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.27 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.34 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.35 // indirect
github.com/aws/smithy-go v1.27.6 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
Expand Down Expand Up @@ -56,7 +56,7 @@ require (
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/shirou/gopsutil/v4 v4.26.3 // indirect
github.com/shirou/gopsutil/v4 v4.26.5 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
Expand Down
Loading
Loading