-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update docker and test configs #2678
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from composer scripts, I don't think these changes improve anything.
Thanks for the suggestion.
I don't want to improve performance or anything else. I just want to update the docker configuration to be more effective and make developing easier. If you look at the current dockerfile, in the last line, it is installing dependencies and run the tests. which means to run the tests, I have to build the |
Another update for the project's structure can be using StyleCI instead of PHP Code Sniffer. StyleCI can be configured to fix the code style using an automated merge commit. |
The last line is the default command when you run the container.
Note that I don't use this docker image to develop because the integration with PHPStorm and xdebug set-by-step debugging is hard to setup. So I just found that the memory limit is too low. This lines should be added after
Not all CS issues can be fixed automatically, but in 90% of cases, we could make it easier for external contributors to contribute by automatically committing modifications proposed by phpcbf. |
It had never run tests on my computer. It is even mentioned here.
So you mean it can be done automatically? How? |
Dockerfile
Outdated
# Enable coverage mode in xdebug | ||
RUN echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/xdebug.ini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Xdebug mode is set to coverage
.
I don't have any more changes to propose and I think it's the end of this PR. |
If you want to merge this PR, you can do it after merging #2664. I think there are some conflicts. |
Conflicts resolved. |
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
name: PHP v${{ matrix.php }} with MongoDB ${{ matrix.mongodb }} ${{ matrix.mode }} | ||
runs-on: "${{ matrix.os }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this change is based on a comment in another PR, but I wonder if it belongs in this PR. As in my eyes it is a code style thing, which adds a lot of noise to the PR. Personally I would create a separate PR to add these changes.
Though personally I don't see a benefit to these changes, but that's me and the project style is leading.
- name: Show PHP version | ||
run: php -v && composer -V | ||
- name: Show Docker version | ||
extensions: "curl,mbstring,xdebug" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the changes, as those are CS changes.
From the action-runners docs/readme
Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.
Does this get overridden with setting the extensions manually?
Co-Authored-By: Tonko Mulder <tonko@tonkomulder.nl>
…ll vendors and run phpunit, fix composer script aliases
I updated the branch with the followings:
|
Thank you @hans-thomas |
Hello there,
I updated the
Dockerfile
anddocker-compose
files. I also added some scripts to thecomposer
that might be used very often.