yii-docker icon indicating copy to clipboard operation
yii-docker copied to clipboard

Docker for tests

Open machour opened this issue 6 years ago • 12 comments

I'd like to discuss the possibility of adding Docker setups in each repositories to help developers running tests.

This wouldn't be a requirement to run tests, and it won't be involved during the Travis builds.

It would allow us to run docker-compose up in the tests directory and immediately having a working environment to fiddle with the extension.

machour avatar Jan 17 '19 13:01 machour

I'm not using Docker much for Yii development but if it helps I'm not against it. @schmunk42 what do you think?

samdark avatar Jan 17 '19 14:01 samdark

I support the idea 100% \o/

@machour: just @ me at will or reach out on Slack or via E-mail. With which repo do you wanna start?

schmunk42 avatar Jan 17 '19 14:01 schmunk42

I support, first build a basic image, and then define it separately according to different extensions. But I think this can be done later, it is most important to make the whole framework work properly, so that you can find out where the framework needs to be adjusted and fixed earlier.

kids-return avatar Jan 17 '19 14:01 kids-return

We have that already ;) https://github.com/yiisoft/yii-docker

Including tests with phpunit tests/framework/ --exclude db https://travis-ci.com/yiisoft/yii-docker

schmunk42 avatar Jan 17 '19 14:01 schmunk42

It isn't about travis. It's about running stuff locally.

samdark avatar Jan 17 '19 15:01 samdark

I support, first build a basic image, and then define it separately according to different extensions.

I actually referred to this, what I wanted to say is: There are Docker images for Yii 3.x

schmunk42 avatar Jan 17 '19 15:01 schmunk42

@kids-return This is for fixing tests. I was about to install sphinx and elasticsearch on my laptop to try and fix tests when I thought of this.

machour avatar Jan 18 '19 10:01 machour

Experienced all kinds of breakage with travis recently so now I'm all for it :)

samdark avatar Aug 09 '19 17:08 samdark

So, there are 7.4 images now. But which tests can/should be run since there's no more yii-core?

schmunk42 avatar Dec 16 '19 22:12 schmunk42

Tests for each individual package: https://www.yiiframework.com/status/3.0. But that's not a priority for now. Travis is OK except it being a bit slow. We're considering GitHub actions though.

samdark avatar Dec 17 '19 09:12 samdark

What takes a lot of time (and space) is a composer install (with dev-packages) for each package, but I think it is the cleanest way to do it.

I'd recommend to run tests which do not need external services such as DBs or caches, since we already have found issues with PHP versions or operating systems.

We can start with a smaller set and/or use branches or triggers to run more if required.

schmunk42 avatar Dec 17 '19 17:12 schmunk42

I think it's better to focus on something else... Travis currently isn't problematic.

samdark avatar Dec 17 '19 17:12 samdark