Skip to content

Commit

Permalink
Merge 2738b68 into c6c23d5
Browse files Browse the repository at this point in the history
  • Loading branch information
mollux authored Jul 29, 2023
2 parents c6c23d5 + 2738b68 commit ff3b26a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
16 changes: 14 additions & 2 deletions .github/ci-files/.env.local → .github/ci-files/.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,17 @@
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
APP_ENV=dev
APP_DEBUG=1
APP_ENV=test
APP_DEBUG=0

DB_HOST=127.0.0.1
DB_NAME=mautictest
DB_USER=root
DB_PORT=3306
DB_PASSWD=
MAUTIC_DB_PREFIX=
MAUTIC_TABLE_PREFIX=
MAUTIC_ENV=test
MAUTIC_ADMIN_USERNAME=admin
MAUTIC_ADMIN_PASSWORD=mautic
MAUTIC_DB_DRIVER=pdo_mysql
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,25 @@ jobs:
sudo chown -R www-data:www-data /var/www/html
rm -rf /var/www/html/*
mv $GITHUB_WORKSPACE/mautic/* /var/www/html/
cp ./.github/ci-files/.env.local /var/www/html/
cp ./.github/ci-files/.env /var/www/html/
sed -i 's/DB_PORT=3306/DB_PORT=${{ job.services.mysql.ports[3306] }}/g' /var/www/html/.env
rm /var/www/html/.env.test
- name: Install Mautic
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
run: |
composer install --prefer-dist --no-progress
cp $GITHUB_WORKSPACE/.github/ci-files/local.php ./app/config/local.php
php bin/console mautic:install http://localhost/ --force --env=dev
php bin/console cache:warmup --no-interaction --env=dev
php bin/console mautic:install http://localhost/ --force --env=test
php bin/console cache:warmup --no-interaction --env=test
working-directory: /var/www/html/

# Enable Twilio plugin with random credentials (needed for MessagesTest to function, doesn't actually contact Twilio API).
- name: Enable Twilio plugin
run: |
mysql -uroot -P${{ job.services.mysql.ports[3306] }} -h127.0.0.1 -e "USE mautictest; INSERT INTO plugin_integration_settings (plugin_id, name, is_published, supported_features, api_keys, feature_settings) VALUES (NULL, 'Twilio', 1, 'a:0:{}', 'a:2:{s:8:\"username\";s:169:\"bzFmNlIydWRSZXlIN2lQVkdpanJ4aTQ2NUh6RVdDbHlLRVhsWGZ4b0kyZVNxLzYrQ1J6V1RvMnlhVEp0c245TEp6eStQekx5ZVhLWjB1YVdoR3RnR2dHQ3k1emVVdGt5NzZKUmtjUnJ3c1E9|L8tbZRIYhwatT7Mq+HAdYA==\";s:8:\"password\";s:169:\"T2d2cFpXQWE5YVZnNFFianJSYURRYUtGRHBNZGZjM1VETXg2Wm5Va3NheW43MjVWUlJhTVlCL2pYMDBpbElONStiVVBNbEM3M3BaeGJMNkFKNUFEN1pTNldSRjc4bUM4SDh1SE9OY1k5MTg9|TeuSvfx4XSUOvp0O7T49Cg==\";}', 'a:4:{s:20:\"sending_phone_number\";N;s:22:\"disable_trackable_urls\";i:0;s:16:\"frequency_number\";N;s:14:\"frequency_time\";N;}');"
php bin/console mautic:plugins:reload --env=dev
php bin/console mautic:plugins:reload --env=test
working-directory: /var/www/html

- name: Set correct ownership so Apache can access the files
Expand Down

0 comments on commit ff3b26a

Please sign in to comment.