Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Docker support for unit tests #23

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open

Docker support for unit tests #23

wants to merge 6 commits into from

Conversation

swharden
Copy link
Contributor

@swharden swharden commented Oct 2, 2021

Added docker files to the home directory and added notes at the bottom of the main readme to make it easy for new developers to run/test phparch in a Linux container

Note that 1 test currently fails: #22

Note that 1 test currently fails: #22
dockerfile Outdated Show resolved Hide resolved
dockerfile Outdated Show resolved Hide resolved
dockerfile Outdated Show resolved Hide resolved
@j6s
Copy link
Owner

j6s commented Oct 2, 2021

Curiously, I could not reproduce #22 - after checking out that branch and running the compose setup, it worked on my machine (TM)

@swharden swharden requested a review from j6s October 2, 2021 21:44
@j6s
Copy link
Owner

j6s commented Oct 19, 2021

When starting from a clean repository without a vendor/ directory, composer install inside of the container fails because a php extension is missing.

php_1  | Installing dependencies from lock file (including require-dev)
php_1  | Verifying lock file contents can be installed on current platform.
php_1  | Package operations: 39 installs, 0 updates, 0 removals
php_1  |     Failed to download symfony/polyfill-ctype from dist: The zip extension and unzip/7z commands are both missing, skipping.
php_1  | The php.ini used by your command-line PHP is: /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
php_1  |     Now trying to download from source
php_1  | 
php_1  |                                                             
php_1  |   [RuntimeException]                                        
php_1  |   git was not found in your PATH, skipping source download  
php_1  |                                                             

CI using GitHub Actions to build docker container used for running PHP tests
installs git and zip so vendor files can be downloaded and extracted
@swharden
Copy link
Contributor Author

Thanks for pointing that out! To prevent "it works on my machine" problems like this I created another GitHub action that builds the docker container (and runs the tests inside it) in the cloud.

I'm not proposing this replace the tests that already run in the cloud (#24), but this will at least let you spot-check that the testing container is building as expected. If it's not helpful you may wish to modify it so it only runs manually (not on every push).

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants