Fixed openswoole E2E tests

This commit is contained in:
Alejandro Celaya 2022-08-27 19:38:05 +02:00
parent 7daa602630
commit 2cf21ab3bd
2 changed files with 8 additions and 7 deletions

View File

@ -29,6 +29,11 @@ jobs:
with:
test-group: unit
cli-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: cli
openswoole-api-tests:
uses: './.github/workflows/ci-tests.yml'
with:
@ -50,11 +55,6 @@ jobs:
- run: ./vendor/bin/rr get --no-interaction --location bin/ && chmod +x bin/rr
- run: composer test:api:rr
cli-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: cli
sqlite-db-tests:
uses: './.github/workflows/ci-db-tests.yml'
with:

View File

@ -13,11 +13,12 @@ use Shlinkio\Shlink\Config\ConfigAggregator\EnvVarLoaderProvider;
use function class_exists;
use function Shlinkio\Shlink\Config\env;
use function Shlinkio\Shlink\Config\runningInOpenswoole;
use function Shlinkio\Shlink\Config\runningInRoadRunner;
use const PHP_SAPI;
$isTestEnv = env('APP_ENV') === 'test';
$enableSwoole = ! runningInRoadRunner() && runningInOpenswoole();
$enableSwoole = PHP_SAPI === 'cli' && ! runningInRoadRunner();
return (new ConfigAggregator\ConfigAggregator([
! $isTestEnv