keboola/storage-driver-common

Keboola common driver

Installs: 1 451

Dependents: 2

Suggesters: 0

Security: 0

Stars: 2

Watchers: 7

Forks: 0

Type:project

v2.4.2 2023-01-19 08:40 UTC

README

Keboola high level common storage backend driver

Setup AWS credentials

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# bucket is needed for import/export tests
AWS_S3_BUCKET=
AWS_REGION=eu-central-1

Build docker images

docker-compose build

Xdebug

To run with xdebug use dev-xdebug container instead of dev

Generate protobuf code

docker-compose run --rm dev composer protobuf

Generate protobuf documentation

Documentation will be placed in docs folder. Check documentation for more options.

docker run --rm \
  -v $(pwd)/docs:/out \
  -v $(pwd)/proto:/protos \
  pseudomuto/protoc-gen-doc

Tests

Run tests with following command.

docker-compose run --rm dev composer tests

To run separate tests first generate testing protobuf classes

docker-compose run --rm dev composer protobufTests

To disable retry copy phpunit-retry.xml.dist

cp phpunit-retry.xml.dist phpunit-retry.xml

Debug queries

To debug queries executed during test set DEBUG=1 env variable

Code quality check

#run all bellow but not tests
docker-compose run --rm dev composer check

#phplint
docker-compose run --rm dev composer phplint

#phpcs
docker-compose run --rm dev composer phpcs

#phpcbf
docker-compose run --rm dev composer phpcbf

#phpstan
docker-compose run --rm dev composer phpstan

Full CI workflow

This command will run all checks and run tests

docker-compose run --rm dev composer ci

License

MIT licensed, see LICENSE file.