Skip to content

Commit

Permalink
Update examples deps (#325)
Browse files Browse the repository at this point in the history
* improve examples validate script

* fix examples validation

* update examples deps

* update Watermill deps

* added example steps to Makefile

* update leftover examples deps

* Validate examples CI (#326)
  • Loading branch information
roblaszczak authored Jan 22, 2023
1 parent 5e51c1b commit ccff4d1
Show file tree
Hide file tree
Showing 104 changed files with 3,796 additions and 3,133 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pr-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pr-examples
on:
pull_request:
paths:
- '_examples/**/*'

jobs:
validate-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.19.1'
- run: make validate_examples
timeout-minutes: 30
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ test_stress:
test_reconnect:
go test -tags=reconnect ./...

validate_examples:
go run dev/update-examples-deps/main.go
go run dev/validate-examples/main.go

build:
go build ./...

Expand All @@ -39,3 +35,8 @@ generate_gomod:
sed -i '\|go |d' go.mod
go mod edit -fmt

update_examples_deps:
go run dev/update-examples-deps/main.go

validate_examples:
(cd dev/validate-examples/ && go run main.go)
2 changes: 1 addition & 1 deletion _examples/basic/1-your-first-app/.validate_example.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
validation_cmd: "docker-compose up"
teardown_cmd: "docker-compose down"
timeout: 60
timeout: 180
expected_output: "received event {ID:[0-9]+}"
6 changes: 3 additions & 3 deletions _examples/basic/1-your-first-app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
server:
image: golang:1.17
image: golang:1.19
restart: unless-stopped
depends_on:
- kafka
Expand All @@ -12,15 +12,15 @@ services:
command: go run main.go

zookeeper:
image: confluentinc/cp-zookeeper:latest
image: confluentinc/cp-zookeeper:7.3.1
logging:
driver: none
restart: unless-stopped
environment:
ZOOKEEPER_CLIENT_PORT: 2181

kafka:
image: confluentinc/cp-kafka:latest
image: confluentinc/cp-kafka:7.3.1
logging:
driver: none
restart: unless-stopped
Expand Down
38 changes: 35 additions & 3 deletions _examples/basic/1-your-first-app/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
module main.go

require (
github.com/ThreeDotsLabs/watermill v1.0.0-rc.2
github.com/ThreeDotsLabs/watermill-kafka/v2 v2.0.0
github.com/ThreeDotsLabs/watermill v1.2.0-rc.11
github.com/ThreeDotsLabs/watermill-kafka/v2 v2.2.2
)

go 1.11
require (
github.com/Shopify/sarama v1.38.0 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama v0.37.0 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/trace v1.11.2 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.5.0 // indirect
)

go 1.19
205 changes: 89 additions & 116 deletions _examples/basic/1-your-first-app/go.sum

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
validation_cmd: "docker-compose up"
teardown_cmd: "docker-compose down"
timeout: 60
expected_output: "msg=\"Starting handler\""
timeout: 180
expected_output: "Adding to feed"
39 changes: 35 additions & 4 deletions _examples/basic/2-realtime-feed/consumer/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
module main.go

require (
github.com/ThreeDotsLabs/watermill v1.0.0-rc.2
github.com/ThreeDotsLabs/watermill-kafka/v2 v2.0.0
github.com/pkg/errors v0.8.1
github.com/ThreeDotsLabs/watermill v1.2.0-rc.11
github.com/ThreeDotsLabs/watermill-kafka/v2 v2.2.2
github.com/pkg/errors v0.9.1
)

go 1.11
require (
github.com/Shopify/sarama v1.38.0 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama v0.37.0 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/trace v1.11.2 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.5.0 // indirect
)

go 1.19
Loading

0 comments on commit ccff4d1

Please sign in to comment.