Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create docker image for run integration unit tests for "laminas-db" #209

Open
ZVanoZ opened this issue Sep 17, 2021 · 1 comment · May be fixed by #217
Open

Create docker image for run integration unit tests for "laminas-db" #209

ZVanoZ opened this issue Sep 17, 2021 · 1 comment · May be fixed by #217

Comments

@ZVanoZ
Copy link
Contributor

ZVanoZ commented Sep 17, 2021

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

At the moment, contributors can't run integration unit test by popular phpunit images.
For example, i run image "jitesoft/phpunit", but it give error, because client library for mssql is not installed.

$ docker run --rm -v $(pwd):/app jitesoft/phpunit:7.4
PHPUnit 9.5.9 by Sebastian Bergmann and contributors.

............................SSSSSSSSSSSS...SS.....IIIII.IIIII   61 / 1229 (  4%)
IIIIIIIISSSSS...III....I.......SSSSSSSSSSSS.......SS.....IIII  122 / 1229 (  9%)
IIIIIIIIIIIIII.......SSSS.......I.I.I......III..I............  183 / 1229 ( 14%)
...................................RRRR.........SS..SSSS.....  244 / 1229 ( 19%)
.IIIII.SSSSSSSSSSSSS...SIIIIIIIIIIIIISSS.....IIIII.SSSS...III  305 / 1229 ( 24%)
III..........................................................  366 / 1229 ( 29%)
...................................R.........................  427 / 1229 ( 34%)
S.................................................R..........  488 / 1229 ( 39%)
.............................................................  549 / 1229 ( 44%)
.........S.........................................W.W.......  610 / 1229 ( 49%)
......................W........W........W........W...........  671 / 1229 ( 54%)
.............................................................  732 / 1229 ( 59%)
.............................................................  793 / 1229 ( 64%)
.............................................................  854 / 1229 ( 69%)
............................RRRRRRRRR.RRRRRR.RRRR.RRRR..RRRRR  915 / 1229 ( 74%)
RRRRRRRRRRRR.R.RRRRR.R.......................................  976 / 1229 ( 79%)
.......................................................R..... 1037 / 1229 ( 84%)
....R...RR................................................... 1098 / 1229 ( 89%)
..................................W.....W.................... 1159 / 1229 ( 94%)
......................................
Integration test started.
could not find driver

I can write local configuration for create image "local-laminas/laminas-db-unittest:74":

  • PHP 7.4
  • client library and PHP-extensions for MSSQL, Oracle.

But don't know where to put files [ Dockerfile; bash scripts; documentation].
For examle, i can create structure like this:

.contributors/README.md

.contributors/docker/phpunit-73/Dockerfile
.contributors/docker/phpunit-73/Dockerfile.sh
.contributors/docker/phpunit-73/build.sh
.contributors/docker/phpunit-73/run.sh

.contributors/docker/phpunit-74/Dockerfile
.contributors/docker/phpunit-74/Dockerfile.sh
.contributors/docker/phpunit-74/build.sh
.contributors/docker/phpunit-74/run.sh

...

Developers need once run "$bash ./.contributors/docker/phpunit-74/build.sh" for create an image.
Then run "$bash ./.contributors/docker/phpunit-74/run.sh" for do tests, each time if need.

But i think, the best way is create base docker images and push them to https://hub.docker.com as official images of laminas comunity.

@ZVanoZ
Copy link
Contributor Author

ZVanoZ commented Sep 22, 2021

I created my own image.

It will be perfect, if laminas comunity do so, but better then my realisation.

fabiang added a commit to fabiang/laminas-db that referenced this issue Sep 23, 2021
fabiang added a commit to fabiang/laminas-db that referenced this issue Sep 23, 2021
@fabiang fabiang linked a pull request Sep 23, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant