* Bump phpstan version to support php 8.1
* Fix some minor issues reported by phpstan
* Invert the elseif condition to check the most specific first
Co-authored-by: Mathieu Imbert <mathieu.imbert@tracktik.com>
The E2E docker-compose stack has been modified to include code
coverage for all scripts that are kept in /project and are not
in the exclusion list.
The start command for `deployer` container has been replaced
with a `start-e2e-test.sh` script, which will execute E2E tests,
generate a Clover report and then return the exit code of E2E test
process to make sure that CI is aware of the test result.
Whole idea for collecting E2E coverage has been inspired by the
[this][1] article. All of scripts in `deployer` container will
now start with additional wrapper-like PHP code, which checks
if the `PHP_CCOV_START_FILE` variable is present. If not,
then nothing happens, but if the variable points to a PHP file,
then that file is being included.
The `docker-compose.yml` file has `PHP_CCOV_START_FILE` configured
to point to a file, which sets up code coverage, that starts counting
which instructions in `/project` directory have been called. Once
`php` interpreter starts shutting down, the coverage report is being
dumped into temporary files.
Once all tests have been processed, a script for merging partial
coverage reports is executed and finally a Clover code coverage file
is stored in the path defined in the `PHP_CCOV_OUTPUT_FILE` env var.
[1]: https://tarunlalwani.com/post/php-code-coverage-web-selenium/
Now, it should not matter what default shell is used on a server: zsh, fish.
Deployer will automatically switch to bash (or to a user-specified shell).
Laso added a release verification task.
As well rename test dir to tests, as Pest does not support dir without s on the end.
Also, remove PHP requirement from composer.json as we already have check-in bin/dep and it's better to have the check only in one place (now they already out of sync).
* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order
- add dependency for polyfill (to use str_ends_with)
- marcj/topsort (for sorting the shopware modules)
* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order
- get the plugin list
- read the composer names and dependencies from composer.lock
- order by dependencies
- use sorted list for activation and migration
* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order
Update changelog
* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order
do not update doc, but remove require autoload.php
* [#2197] Created E2E testing environment
Created docker-based end-to-end testing environment, which allows
for testing more complex scenarios.
Additionally added FunctionE2ETest class that contains test scenario
for `run` function with placeholders.
Closes#2197
* [#2197] Moved docker to test dir & separated e2e tests from unit-tests
The docker directory has been moved into test/ directory.
Additionally the e2e tests have been separated from the unit-test
files:
* AbstractE2ETest class is directly inheriting from TestCase,
dropping relation to the AbstractTest
* Separate bootstrap.php file for e2e test was created
* Separate phpunit-e2e.xml.dist file was created to configure
PHPUnit for just the e2e tests
* deployer docker service now runs only e2e tests by default
* [#2197] Added E2E tests to GH actions
Added E2E tests steps to GH actions:
* building the docker-compose stack (building images)
* starting the stack to run the tests
If E2E tests fail, then docker-compose up will end with non-zero
exit code, thus the workflow will be marked as failed.
* [#2197] Fixed no output when using run() with sudo
Fixed a discrepancy in the `run()` function, where there would be
no output when the command was being executed with a sudo.
* [#2197] Added testcases for running commands with sudo
Added two testcases for e2e tests, that verify:
* that sudo command can be ran with password provided interactively
* that sudo command can be ran with password passed via argument
To allow for these tests to happen, the Dockerfile for server
service had to be modified - the deployer user will require a
password, when running command with sudo.
* [#2197] Added Laravel-boilerplate deploy E2E test
Added a very simple E2E test that checks whether the Laravel-boilerplate
deploys successfully to the testing server.
The testing scenario will deploy the app, copy sample .env file,
generate the app key and finally try to get the main page contents
to verify that the expected string is visible in the page source.
* [#2197] Moved E2E tests to separate job
Moved E2E tests to separate job and added docker-compose cache
to slightly improve stack build times.
* [#2197] Using deployphp test-laravel repo for E2E tests
Updated the laravel-boilerplate deploy config to use the repository
that belongs to deployphp organization.
Co-authored-by: Bartlomiej Sacharski <beton@cementowina.org>
Refactored the code in `src/Configuration` to include type declarations
for method arguments and returned values.
To make it easier to track what's left to do and to have a tool that
prevents "regressions" in the future, PHP_CodeSniffer and Slevomat
Coding Standard have been added.
Next, a `phpcs.xml.dist` file has been created and configured to
enforce type hints for methods. For the time being, only files in
the src/Configuration directory are now being watched.
To make it simpler to execute the checks, `lint` script has been
added to `composer.json` to allow running checks with `composer lint`.