Skip to content

Commit

Permalink
go.mod: bump github.com/conduitio/conduit-connector-sdk from 0.8.0 to…
Browse files Browse the repository at this point in the history
… 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
dependabot[bot] and lovromazgon authored Apr 26, 2024
1 parent 79a1a44 commit 759a12d
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 122 deletions.
23 changes: 6 additions & 17 deletions .github/workflows/build.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
name: build
name: lint

on:
push:
branches: [ main ]
pull_request:

jobs:
build_and_lint:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
- 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 step sets up the variable steps.golangci-lint-version.outputs.v
# to contain the version of golangci-lint (e.g. v1.54.2).
# The version is taken from go.mod.
Expand All @@ -33,15 +22,15 @@ jobs:
run: |
GOLANGCI_LINT_VERSION=$( go list -m -f '{{.Version}}' github.com/golangci/golangci-lint )
echo "v=$GOLANGCI_LINT_VERSION" >> "$GITHUB_OUTPUT"
- name: golangci-lint
uses: golangci/golangci-lint-action@v5
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

uses: golangci/golangci-lint-action@v4.0.0
with:
version: ${{ steps.golangci-lint-version.outputs.v }}
skip-pkg-cache: true
args: --timeout=2m
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
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"
26 changes: 13 additions & 13 deletions Makefile
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
3 changes: 1 addition & 2 deletions cmd/db2/main.go → cmd/connector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
package main

import (
sdk "github.com/conduitio/conduit-connector-sdk"

db2 "github.com/conduitio-labs/conduit-connector-db2"
sdk "github.com/conduitio/conduit-connector-sdk"
)

func main() {
Expand Down
46 changes: 22 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
module github.com/conduitio-labs/conduit-connector-db2

go 1.21

toolchain go1.21.1
go 1.22.2

require (
github.com/brianvoe/gofakeit v3.18.0+incompatible
github.com/conduitio/conduit-connector-sdk v0.8.0
github.com/conduitio/conduit-connector-sdk v0.9.1
github.com/go-playground/validator/v10 v10.19.0
github.com/golang/mock v1.6.0
github.com/golangci/golangci-lint v1.57.2
Expand Down Expand Up @@ -54,7 +52,8 @@ require (
github.com/charithe/durationcheck v0.0.10 // indirect
github.com/chavacava/garif v0.1.0 // indirect
github.com/ckaznocha/intrange v0.1.1 // indirect
github.com/conduitio/conduit-connector-protocol v0.5.0 // indirect
github.com/conduitio/conduit-commons v0.2.0 // indirect
github.com/conduitio/conduit-connector-protocol v0.6.0 // indirect
github.com/curioswitch/go-reassign v0.2.0 // indirect
github.com/daixiang0/gci v0.12.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down Expand Up @@ -82,7 +81,7 @@ require (
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect
github.com/golangci/misspell v0.4.1 // indirect
Expand All @@ -96,11 +95,11 @@ require (
github.com/gostaticanalysis/comment v1.4.2 // indirect
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
github.com/hashicorp/go-hclog v1.2.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.11 // indirect
Expand Down Expand Up @@ -134,7 +133,7 @@ require (
github.com/mgechev/revive v1.3.7 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/moricho/tparallel v0.3.1 // indirect
Expand All @@ -143,7 +142,7 @@ require (
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.16.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.0 // indirect
Expand All @@ -157,7 +156,7 @@ require (
github.com/quasilyte/gogrep v0.5.0 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/rs/zerolog v1.31.0 // indirect
github.com/rs/zerolog v1.32.0 // indirect
github.com/ryancurrah/gomodguard v1.3.1 // indirect
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
Expand All @@ -174,7 +173,7 @@ require (
github.com/sourcegraph/go-diff v0.7.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
Expand All @@ -200,21 +199,20 @@ require (
gitlab.com/bosi/decorder v0.4.1 // indirect
go-simpler.org/musttag v0.9.0 // indirect
go-simpler.org/sloglint v0.5.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.59.0 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit 759a12d

Please sign in to comment.