keboola / storage-driver-common
Keboola common driver
v2.4.2
2023-01-19 08:40 UTC
Requires
- php: >=7.4
- ext-json: *
- aws/aws-sdk-php: ^3
- google/protobuf: ^3.21
- keboola/common-exceptions: ^1
- keboola/php-file-storage-utils: ^0.2.2
Requires (Dev)
- keboola/coding-standard: ^14.0.0
- keboola/phpunit-retry-annotations: ^0.3.0
- php-parallel-lint/php-parallel-lint: ^1.3
- phpstan/phpstan: ^1.4
- phpstan/phpstan-phpunit: ^1.0
- phpstan/phpstan-symfony: ^1.1
- phpunit/phpunit: 9.2.*
- symfony/finder: ^5.4
This package is auto-updated.
Last update: 2023-01-23 15:07:50 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.