Skip to content

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

Open
@ZVanoZ

Description

@ZVanoZ

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions