-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go.mod: bump github.com/conduitio/conduit-connector-sdk from 0.8.0 to…
… 0.9.1 (#101) * go.mod: bump github.com/conduitio/conduit-connector-sdk Bumps [github.com/conduitio/conduit-connector-sdk](https://github.com/conduitio/conduit-connector-sdk) from 0.8.0 to 0.9.1. - [Commits](ConduitIO/conduit-connector-sdk@v0.8.0...v0.9.1) --- updated-dependencies: - dependency-name: github.com/conduitio/conduit-connector-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * update Go version to 1.22 * housekeeping * split build and test ci actions --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lovro Mažgon <lovro.mazgon@gmail.com>
- Loading branch information
1 parent
79a1a44
commit 759a12d
Showing
9 changed files
with
158 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Test | ||
env: | ||
DB2_CONNECTION: HOSTNAME=localhost;DATABASE=testdb;PORT=50000;UID=DB2INST1;PWD=pwd | ||
IBM_DB_HOME: /home/runner/work/clidriver | ||
CGO_CFLAGS: -I/home/runner/work/clidriver/include | ||
CGO_LDFLAGS: -L/home/runner/work/clidriver/lib | ||
LD_LIBRARY_PATH: /home/runner/work/clidriver/lib | ||
run: make test GOTEST_FLAGS="-v -count=1 -race -gcflags=all=-d=checkptr=0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
GOLINT := golangci-lint | ||
DB2_STARTUP_TIMEOUT ?= 50 | ||
|
||
.PHONY: build test | ||
|
||
.PHONY: build | ||
build: | ||
go build -o conduit-connector-db2 cmd/db2/main.go | ||
go build -ldflags "-X 'github.com/conduitio-labs/conduit-connector-db2.version=${VERSION}'" -o conduit-connector-db2 cmd/connector/main.go | ||
|
||
.PHONY: test | ||
test: | ||
go install github.com/ibmdb/go_ibm_db/installer@v0.4.2 | ||
go run $(shell go env GOMODCACHE)/github.com/ibmdb/go_ibm_db@v0.4.2/installer/setup.go | ||
docker run -itd --name mydb2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=pwd -e DBNAME=testdb -v /db2/vol:/database ibmcom/db2 | ||
sleep $(DB2_STARTUP_TIMEOUT) | ||
go test $(GOTEST_FLAGS) ./...; ret=$$?; \ | ||
docker stop mydb2; \ | ||
exit $$ret | ||
go list -f "{{.Module.Version}}" github.com/ibmdb/go_ibm_db/installer | xargs -tI % go run github.com/ibmdb/go_ibm_db/installer@% | ||
# run required docker containers, execute integration tests, stop containers after tests | ||
docker compose -f test/docker-compose.yml up --quiet-pull -d --wait | ||
go test $(GOTEST_FLAGS) -race ./...; ret=$$?; \ | ||
docker compose -f test/docker-compose.yml down --volumes; \ | ||
exit $$ret | ||
|
||
.PHONY: lint | ||
lint: | ||
golangci-lint run -v | ||
|
||
.PHONY: mockgen | ||
mockgen: | ||
mockgen -package mock -source destination/interface.go -destination destination/mock/destination.go | ||
mockgen -package mock -source source/interface.go -destination source/mock/iterator.go | ||
|
||
.PHONY: install-tools | ||
install-tools: | ||
@echo Installing tools from tools.go | ||
@go list -e -f '{{ join .Imports "\n" }}' tools.go | xargs -tI % go install % | ||
@go mod tidy | ||
@go list -e -f '{{ join .Imports "\n" }}' tools.go | xargs -I % go list -f "%@{{.Module.Version}}" % | xargs -tI % go install % | ||
@go mod tidy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.