Skip to content

Commit

Permalink
feat!: moved bunx and dockertestx out of the root modules (#79)
Browse files Browse the repository at this point in the history
* feat!: independent modules: bunx and dockertestx

* chore: independent modules: bunx and dockertestx

* chore: test sub modules

* chore: test release

* chore: add dependabot for sub modules

* chore: beta release

* chore: delete test run
  • Loading branch information
sawadashota authored Dec 1, 2024
1 parent 7bdab42 commit 93ad5a5
Show file tree
Hide file tree
Showing 16 changed files with 646 additions and 258 deletions.
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,37 @@ updates:
update-types:
- "patch"
- "minor"

- package-ecosystem: "gomod"
directory: "/bunx"
schedule:
interval: "weekly"
day: "thursday"
time: "07:00"
timezone: "Asia/Tokyo"
reviewers:
- sawadashota
- kensei18
- ryosan-470
groups:
patch-minor:
update-types:
- "patch"
- "minor"

- package-ecosystem: "gomod"
directory: "/dockertestx"
schedule:
interval: "weekly"
day: "thursday"
time: "07:00"
timezone: "Asia/Tokyo"
reviewers:
- sawadashota
- kensei18
- ryosan-470
groups:
patch-minor:
update-types:
- "patch"
- "minor"
7 changes: 3 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
- uses: googleapis/release-please-action@v4
with:
release-type: simple
default-branch: main
bump-minor-pre-major: yes
config-file: release-please-config.json
include-component-in-tag: true
token: ${{ secrets.GITHUB_TOKEN }}
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,46 @@ jobs:
- run: go mod download
- run: go mod verify
- run: go test -v -count=1 -race ./...

unit-dockertestx:
runs-on: ubuntu-latest
defaults:
run:
working-directory: dockertestx
strategy:
matrix:
go:
- '1.22'
- '1.23'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- run: go mod download
- run: go mod verify
- run: go test -v -count=1 -race ./...

unit-bunx:
runs-on: ubuntu-latest
defaults:
run:
working-directory: bunx
strategy:
matrix:
go:
- '1.23'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- run: go mod download
- run: go mod verify
- run: go test -v -count=1 -race ./...
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ linters:
- typecheck
- unused

run:
skip-dirs:
issues:
exclude-dirs:
- gen
- design
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export GO111MODULE := on
export PATH := $(GOBIN):${PATH}

GO_DEPENDENCIES = golang.org/x/tools/cmd/goimports@master \
github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2

define make-go-dependency
# go install is responsible for not re-building when the code hasn't changed
Expand All @@ -32,15 +32,15 @@ endif

.PHONY: deps
deps: ## download dependencies
$(GO) mod download
$(GO) mod tidy
find . -name go.mod -execdir $(GO) mod download \;
find . -name go.mod -execdir $(GO) mod tidy \;

.PHONY: test
test: unit-test ## test all

.PHONY: unit-test
unit-test: ## unit test
$(GOTEST) -failfast -cover -count=1 -race ./...
find . -name go.mod -execdir $(GOTEST) -failfast -cover -count=1 -race ./... \;

.PHONY: clean
clean: ## clean bin and cache
Expand All @@ -49,12 +49,12 @@ clean: ## clean bin and cache

.PHONY: fmt
fmt: .bin/goimports ## format source
goimports $(GOIMPORTSFLAGS) -w .
$(GO) mod tidy
find . -name go.mod -execdir goimports $(GOIMPORTSFLAGS) -w . \;
find . -name go.mod -execdir $(GO) mod tidy \;

.PHONY: golangci-lint
golangci-lint: .bin/golangci-lint ## Exec golangci-lint
golangci-lint run ./...
find . -name go.mod -execdir golangci-lint run ./... \;

.PHONY: lint
lint: golangci-lint ## exec lint
Expand Down
77 changes: 77 additions & 0 deletions bunx/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module github.com/tier4/x-go/bunx

go 1.23.3

replace github.com/tier4/x-go/dockertestx => ../dockertestx

require (
github.com/stretchr/testify v1.10.0
github.com/tier4/x-go/dockertestx v0.0.0-00010101000000-000000000000
github.com/uptrace/bun v1.2.6
github.com/uptrace/bun/dialect/pgdialect v1.2.6
github.com/uptrace/bun/driver/pgdriver v1.2.6
go.uber.org/zap v1.27.0
golang.org/x/sync v0.9.0
)

require (
dario.cat/mergo v1.0.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/aws/aws-sdk-go-v2 v1.32.5 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.46 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.37.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.5 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sqs v1.37.1 // indirect
github.com/aws/smithy-go v1.22.1 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/containerd/continuity v0.4.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v27.3.1+incompatible // indirect
github.com/docker/docker v27.3.1+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/user v0.3.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/opencontainers/runc v1.2.2 // indirect
github.com/ory/dockertest/v3 v3.11.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/puzpuzpuz/xsync/v3 v3.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.9-0.20240816141633-0a40785b4f41 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/sys v0.27.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
mellium.im/sasl v0.3.2 // indirect
)
Loading

0 comments on commit 93ad5a5

Please sign in to comment.