57 Commits

Author SHA1 Message Date
Anton Medvedev
af995ac8dc
Add docgen check action (#2223) 2020-10-25 16:58:37 +03:00
Markus Staab
7bb908608f
Add phpstan (#2218)
* added phpstan static analysis via GitHub Actions

* Update CHANGELOG.md

* fix bad merge

* Update phpstan.yml

Co-authored-by: Anton Medvedev <anton@medv.io>
2020-10-25 11:21:07 +03:00
Andrey Helldar
9f89525548
[composer 3] Removed deprecated option "--no-suggest" (#2212)
* [composer 3] deprecated option "--no-suggest"

* Updated CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Anton Medvedev <anton@medv.io>
2020-10-21 23:53:25 +02:00
Anton Medvedev
3667c991df Rename build to unit 2020-10-19 23:58:24 +02:00
Sacharski Bartłomiej
67ed1a800b
[#2197] Created E2E testing environment (#2198)
* [#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>
2020-10-19 23:38:15 +03:00
Anton Medvedev
54748566a9 Improve tests 2020-10-09 00:15:28 +02:00
Anton Medvedev
e2875b4dfd
Create test.yml 2020-09-28 09:52:04 +03:00