From 6b3f74f69d0b68b259ab00e2f797152ddf030ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4se?= Date: Wed, 25 Dec 2024 00:46:43 +0100 Subject: [PATCH] Update GitHub workflow --- .github/workflows/ci.yml | 2 +- config/.env.ci | 14 ++++++++++++++ scripts/install-ci.sh | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 config/.env.ci diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e93421b..a4abdcdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Environment run: | sudo systemctl start mysql.service - mysql -e 'CREATE DATABASE db;' -u db -p db + mysql -e 'CREATE DATABASE db;' -u root -p root sudo systemctl start apache2 - name: Unit & Kernel Tests run: vendor/bin/phpunit --testsuite unit,kernel diff --git a/config/.env.ci b/config/.env.ci new file mode 100644 index 00000000..39e64c0a --- /dev/null +++ b/config/.env.ci @@ -0,0 +1,14 @@ +PROJECT_NAME=youvo + +SITE_NAME=youvo.org +SITE_MAIL=hello@youvo.org +ACCOUNT_NAME=admin@youvo.org +ACCOUNT_MAIL=admin@youvo.org +ACCOUNT_PASS=admin + +DB_NAME=db +DB_USER=root +DB_PASSWORD=root +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DRIVER=mysql diff --git a/scripts/install-ci.sh b/scripts/install-ci.sh index 71bd9593..aeee91be 100644 --- a/scripts/install-ci.sh +++ b/scripts/install-ci.sh @@ -4,7 +4,7 @@ set -e # Get variables. - set -a; source config/.env.local; set +a + set -a; source config/.env.ci; set +a echo "Variables loaded ..." # Reset settings. @@ -27,7 +27,7 @@ cd ../../.. vendor/bin/drush si --yes --existing-config \ --locale=en \ - --db-url="${DB_DRIVER}"://"${DB_USER}":"${DB_PASSWORD}"@127.0.0.1:"${DB_PORT}"/"${DB_NAME}" \ + --db-url="${DB_DRIVER}"://"${DB_USER}":"${DB_PASSWORD}"@"${DB_HOST}":"${DB_PORT}"/"${DB_NAME}" \ --site-name="${SITE_NAME}" \ --site-mail="${SITE_MAIL}" \ --account-name="${ACCOUNT_NAME}" \