Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
YoEight committed Oct 27, 2023
1 parent af5ca4f commit 7768e35
Show file tree
Hide file tree
Showing 13 changed files with 825 additions and 85 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Generate protos and build project (Powershell)
if: ${{ matrix.os == 'windows-2019' }}
run: .\build.ps1 -generateProtos
shell: pwsh

- name: Generate protos and build project (Bash)
if: ${{ matrix.os != 'windows-2019' }}
run: ./build.sh --generate-protos
- name: Generate protos and build project
run: make generate-protos-and-build

- name: Misc tests
run: go test -v ./esdb -run TestMisc
run: make misc

tests:
needs: build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: docker-compose --file docker-compose.yml up

- name: Run Go Tests
run: go test -v ./esdb -run Test${{ matrix.test }}
run: make ci CI_TARGET=Test${{ matrix.test }}
env:
EVENTSTORE_DOCKER_TAG_ENV: ${{ inputs.esdb_version }}
EVENTSTORE_INSECURE: true
Expand All @@ -45,7 +45,7 @@ jobs:
run: docker-compose --file docker-compose.yml up

- name: Run Go Tests
run: go test -v ./esdb -run Test${{ matrix.test }}
run: make ci CI_TARGET=Test${{ matrix.test }}

env:
EVENTSTORE_DOCKER_TAG_ENV: ${{ inputs.esdb_version }}
Expand All @@ -68,7 +68,7 @@ jobs:
docker-compose -f cluster-docker-compose.yml up -d
- name: Run Go Tests
run: go test -v ./esdb -run Test${{ matrix.test }}
run: make ci CI_TARGET=Test${{ matrix.test }}

env:
EVENTSTORE_DOCKER_TAG_ENV: ${{ inputs.esdb_version }}
Expand Down
25 changes: 15 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ help:

OS := $(shell uname)

GENERATE_PROTOS_FLAG :=
GENERATE_PROTOS_FLAG=
CI_TARGET=

.PHONY: build
build: ## Build based on the OS.
Expand All @@ -14,18 +15,18 @@ ifeq ($(OS),Linux)
else ifeq ($(OS),Darwin)
./build.sh $(GENERATE_PROTOS_FLAG)
else
.\build.ps1 $(GENERATE_PROTOS_FLAG)
pwsh.exe -File ".\build.ps1" $(GENERATE_PROTOS_FLAG)
endif

.PHONY: generate-protos
generate-protos: ## Regenerate protobuf and gRPC files while building.
.PHONY: generate-protos-and-build
generate-protos-and-build: ## Generate protobuf and gRPC files while building.
ifeq ($(OS),Linux)
$(eval GENERATE_PROTOS_FLAG := --generate-protos)
$(MAKE) build GENERATE_PROTOS_FLAG=--generate-protos
else ifeq ($(OS),Darwin)
$(MAKE) build GENERATE_PROTOS_FLAG=--generate-protos
else
$(eval GENERATE_PROTOS_FLAG := -generateProtos)
$(MAKE) build GENERATE_PROTOS_FLAG=-generateProtos
endif
build


DOCKER_COMPOSE_CMD := $(shell command -v docker-compose 2> /dev/null)
ifeq ($(DOCKER_COMPOSE_CMD),)
Expand All @@ -34,7 +35,7 @@ endif

.PHONY: singleNode
singleNode: ## Run tests against a single node.
@EVENTSTORE_INSECURE=true go test -count=1 -v ./esdb -run 'TestStreams|TestPersistentSubscriptions|Expectations'
@EVENTSTORE_INSECURE=true go test -count=1 -v ./esdb -run 'TestStreams|TestPersistentSubscriptions|TestExpectations'

.PHONY: secureNode
secureNode: ## Run tests against a secure node.
Expand All @@ -59,4 +60,8 @@ misc: ## Run tests that don't need a server to run.
go test -v ./esdb -run TestMisc

.PHONY: test
test: singleNode secureNode clusterNode misc ## Run all tests.
test: singleNode secureNode clusterNode misc ## Run all tests.

.PHONY: ci
ci: ## Run tests in Github Actions setting.
go test -v ./esdb -run "$(CI_TARGET)"
32 changes: 5 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,21 @@ This repository contains an [EventStoreDB][es] Client SDK written in Go.
Integration tests run against a server using Docker, with the [EventStoreDB gRPC Client Test Container][container].

### Setup dependencies

Some dependencies are required in order to work with the code:

* Certificates for testing TLS requirements, located at `./certs`.

Testing requires [Docker] and [Docker Compose] to be installed.

## Build the project

On Windows, you need `Powershell`. The version that comes standard with Windows is enough. On a Unix system, any bash
You need [make] to be installed (available on all OSes). On Windows, you need `Powershell`. The version that comes standard with Windows is enough. On a Unix system, any bash
compatible shell should work.

### Windows

```powershell
.\build.ps1
```

### Unix (Linux or OSX)

```bash
./build.sh
make build
```

To also regenerate protobuf and gRPC files while building

### Windows

```powershell
.\build.ps1 -generateProtos
```

### Unix (Linux or OSX)

```bash
./build.sh --generate-protos
make generate-protos-and-build
```

## Run tests
Expand All @@ -55,9 +34,7 @@ By default the tests use `ghcr.io/eventstore/eventstore:ci`. To override this, s

```shell
export EVENTSTORE_DOCKER_TAG_ENV="21.10.0-focal"
docker-compose -f cluster-docker-compose.yml up -d
go test ./esdb
docker-compose -f cluster-docker-compose.yml down
make test
```

## Security
Expand All @@ -75,3 +52,4 @@ All contributions to the SDK are made via GitHub Pull Requests, and must be lice
[docker compose]: https://www.docker.com/

[es]: https://eventstore.com
[make]: https://www.gnu.org/software/make/
11 changes: 5 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ go 1.16
require (
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe // indirect
github.com/davecgh/go-spew v1.1.1
github.com/gofrs/uuid v3.3.0+incompatible
github.com/gofrs/uuid v4.4.0+incompatible
github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e
github.com/lib/pq v1.8.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/ory/dockertest/v3 v3.6.3
github.com/stretchr/testify v1.8.1
golang.org/x/net v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.28.1
github.com/stretchr/testify v1.8.3
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
)
Loading

0 comments on commit 7768e35

Please sign in to comment.