Skip to content

Commit

Permalink
Add GitHub Actions to test stacks initialization and image building (#16
Browse files Browse the repository at this point in the history
)

* Refactored a bit the test fixtures architecture to handle image build test
* Updated supported sunset versions for OroCRM and OroPlatform
* Updated README with supported sunset versions for OroCRM and OroPlatform, also for Oro 4.2
* Fixed some environments declarations
* Added support for PHP 8.0 on all stacks
* Added support for Oro 4.2
* Fixed some PHPUnit and PHPSpec tests
* Changed the timeout of the test runner
* Fixed an issue of missing elastic stack on old Marello EE versions
  • Loading branch information
gplanchat authored Nov 18, 2020
1 parent 57b8524 commit 02e880a
Show file tree
Hide file tree
Showing 136 changed files with 3,524 additions and 1,289 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ jobs:
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run PHPUnit test suite
run: composer run-script phpunit
env:
COMPOSER_PROCESS_TIMEOUT: 900
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ RUN set -ex\
&& chown docker:docker /opt/docker/.npm

ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
ENV current_os=alpine
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/$current_os/amd64/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& curl -A "Docker" -L https://blackfire.io/api/v1/releases/client/linux_static/amd64 | tar zxp -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire /usr/bin/blackfire \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz

COPY config/memory.ini /usr/local/etc/php/conf.d/memory.ini
COPY config/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
Expand Down
47 changes: 31 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,13 @@ Supported versions and flavours

| Version | PHP 5.6 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 |
| ------- | ------- | ------- | ------- | ------- | ------- | ------- |
| ^1.6 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^1.8 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^1.10 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^2.6 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^3.1 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^4.1 | ❌ | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |
| ^4.2 | ❌ | ❌ | ❌ | ❌️ | ✅️ | ⚠️ |

#### Enterprise Edition

Expand All @@ -465,10 +467,13 @@ Supported versions and flavours

| Version | PHP 5.6 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 |
| ------- | ------- | ------- | ------- | ------- | ------- | ------- |
| ^1.8 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^1.10 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^1.12 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^2.6 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^3.1 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^4.1 | ❌ | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |
| ^4.2 | ❌ | ❌ | ❌ | ❌️ | ✅️ | ⚠️ |

### OroCRM

Expand All @@ -481,9 +486,13 @@ Supported versions and flavours

| Version | PHP 5.6 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 |
| ------- | ------- | ------- | ------- | ------- | ------- | ------- |
| ^1.6 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^1.8 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^1.10 | 🌅️ | ❌ | ❌ | ❌ | ❌️ | ❌ |
| ^2.6 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^3.1 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^4.1 | ❌ | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |
| ^4.2 | ❌ | ❌ | ❌ | ❌️ | ✅️ | ⚠️ |

#### Enterprise Edition

Expand All @@ -494,9 +503,13 @@ Supported versions and flavours

| Version | PHP 5.6 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 |
| ------- | ------- | ------- | ------- | ------- | ------- | ------- |
| ^1.8 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^1.10 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^1.12 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^2.6 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^3.1 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^4.1 | ❌ | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |
| ^4.2 | ❌ | ❌ | ❌ | ❌️ | ✅️ | ⚠️ |

### OroCommerce

Expand All @@ -512,6 +525,7 @@ Supported versions and flavours
| ^1.6 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^3.1 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^4.1 | ❌ | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |
| ^4.2 | ❌ | ❌ | ❌ | ❌️ | ✅️ | ⚠️ |

#### Enterprise Edition

Expand All @@ -525,6 +539,7 @@ Supported versions and flavours
| ^1.6 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^3.1 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^4.1 | ❌ | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |
| ^4.2 | ❌ | ❌ | ❌ | ❌️ | ✅️ | ⚠️ |

### Marello

Expand All @@ -535,14 +550,14 @@ Supported versions and flavours
* 🌅️ discontinued
* ⚠️ experimental

| Version | PHP 5.6 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 |
| ------- | ------- | ------- | ------- | ------- | ------- | ------- |
| ^1.5 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^1.6 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^2.0 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^2.1 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^2.2 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^3.0 | ❌ | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |
| Version | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 |
| ------- | ------- | ------- | ------- | ------- | ------- |
| ^1.4 | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^1.5 | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^2.0 | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^2.1 | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^2.2 | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^3.0 | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |

#### Enterprise Edition

Expand All @@ -551,14 +566,14 @@ Supported versions and flavours
* 🌅️ discontinued
* ⚠️ experimental

| Version | PHP 5.6 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 |
| ------- | ------- | ------- | ------- | ------- | ------- | ------- |
| ^1.5 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^1.6 | 🌅️ | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^2.0 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^2.1 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^2.2 | ❌ | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^3.0 | ❌ | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |
| Version | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 |
| ------- | ------- | ------- | ------- | ------- | ------- |
| ^1.2 | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^1.3 | 🌅️ | ❌ | ❌ | ❌️ | ❌ |
| ^2.0 | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^2.1 | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^2.2 | ✅ | ✅ | ⚠️ | ⚠️ | ⚠️ |
| ^3.0 | ❌ | ❌ | ✅️ | ✅️ | ⚠️ |

### Middleware

Expand Down
33 changes: 21 additions & 12 deletions bin/kloud
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,67 @@ if (version_compare(PHP_VERSION, '5.4.0') < 0) {

require __DIR__ . '/../vendor/autoload.php';

use Kiboko\Cloud\Domain\Packaging\Execution\CommandBus\SequentialCommandRunner;
use Kiboko\Cloud\Platform\Console\Command;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;

$app = new Application('Kiboko Docker Builder');

$input = new ArgvInput($argv);
$output =new ConsoleOutput();

$commandRunner = new SequentialCommandRunner($input, $output);

$app->addCommands([
(new Command\Images\BuildCommand(
Command\Images\BuildCommand::$defaultName,
$commandRunner,
__DIR__ . '/../config/',
__DIR__ . '/../environments'
__DIR__ . '/../environments',
Command\Images\BuildCommand::$defaultName,
))->setAliases(['build', 'wizard']),

(new Command\Images\PushCommand(
Command\Images\PushCommand::$defaultName,
$commandRunner,
__DIR__ . '/../config/',
__DIR__ . '/../environments'
__DIR__ . '/../environments',
Command\Images\PushCommand::$defaultName,
))->setAliases(['push']),

(new Command\Images\PullCommand(
Command\Images\PullCommand::$defaultName,
$commandRunner,
__DIR__ . '/../config/',
__DIR__ . '/../environments'
__DIR__ . '/../environments',
Command\Images\PullCommand::$defaultName,
))->setAliases(['pull']),

(new Command\Images\ListCommand(
__DIR__ . '/../config/',
Command\Images\ListCommand::$defaultName,
__DIR__ . '/../config/'
))->setAliases(['which']),

(new Command\Images\TreeCommand(
__DIR__ . '/../config/',
Command\Images\TreeCommand::$defaultName,
__DIR__ . '/../config/'
))->setAliases(['tree']),

(new Command\Images\TestCommand(
__DIR__ . '/../config/',
Command\Images\TestCommand::$defaultName,
__DIR__ . '/../config/'
))->setAliases(['test']),

(new Command\Stack\InitCommand(
Command\Stack\InitCommand::$defaultName,
__DIR__ . '/../config/',
__DIR__ . '/../compose/',
Command\Stack\InitCommand::$defaultName,
))->setAliases(['init']),

(new Command\Stack\UpgradeCommand(
Command\Stack\UpgradeCommand::$defaultName,
__DIR__ . '/../config/',
__DIR__ . '/../compose/',
Command\Stack\UpgradeCommand::$defaultName,
))->setAliases(['upgrade']),
]);

$app->run(new ArgvInput($argv), new ConsoleOutput());
$app->run($input, $output);
Loading

0 comments on commit 02e880a

Please sign in to comment.