Skip to content

Commit 4348a87

Browse files
committed
seperate config file and install procedure
1 parent b92bda2 commit 4348a87

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

.github/ci-files/local_4.php

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
/**
3+
* Parameter overrides for GitHub Actions.
4+
*/
5+
$parameters = [
6+
'api_enabled' => true,
7+
'api_enable_basic_auth' => true,
8+
'db_driver' => 'pdo_mysql',
9+
'db_host' => '127.0.0.1',
10+
'db_table_prefix' => null,
11+
'db_port' => getenv('DB_PORT'),
12+
'db_name' => 'mautictest',
13+
'db_user' => 'root',
14+
'db_password' => '',
15+
'admin_email' => '[email protected]',
16+
'admin_password' => 'mautic',
17+
'mailer_transport' => 'smtp',
18+
'mailer_host' => 'localhost',
19+
'mailer_port' => '1025',
20+
];
File renamed without changes.

.github/workflows/tests.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,14 @@ jobs:
104104
DB_PORT: ${{ job.services.mysql.ports[3306] }}
105105
run: |
106106
composer install --prefer-dist --no-progress
107-
cp $GITHUB_WORKSPACE/.github/ci-files/local.php ./app/config/local.php
108-
php bin/console mautic:install http://localhost/ --force --env=test
107+
if [[ "$(jq -r '.version | .[0:1]' app/release_metadata.json)" == "4" ]]; then
108+
cp $GITHUB_WORKSPACE/.github/ci-files/local_4.php ./app/config/local.php
109+
php bin/console mautic:install http://localhost/ --force --env=test--mailer_from_name="GitHub Actions" --mailer_from_email="[email protected]"
110+
else
111+
cp $GITHUB_WORKSPACE/.github/ci-files/local_5.php ./app/config/local.php
112+
php bin/console mautic:install http://localhost/ --force --env=test
113+
fi
114+
109115
php bin/console cache:warmup --no-interaction --env=test
110116
working-directory: /var/www/html/
111117

0 commit comments

Comments
 (0)