-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
126 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'automate' | ||
|
||
jobs: | ||
ci-current: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 15 | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- shopware-version: 'v5.7.17' | ||
php-version: 8.2 | ||
|
||
name: Shopware ${{ matrix.shopware-version }} @ ${{ matrix.php-version }} | ||
|
||
container: | ||
image: netzkollektivgmbh/docker-shopware:php-${{ matrix.php-version }} | ||
env: | ||
PLUGIN_DIR: /opt/shopware/engine/Shopware/Plugins/Local/Frontend/NetzkollektivEasyCredit | ||
SW_DIR: /opt/shopware | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Debug | ||
run: | | ||
php -v | ||
php -m | ||
composer -V | ||
env | ||
- name: Initialize | ||
run: | | ||
ls -lia $GITHUB_WORKSPACE/bin | ||
chmod +x $GITHUB_WORKSPACE/bin/* | ||
$GITHUB_WORKSPACE/bin/init-mysql | ||
$GITHUB_WORKSPACE/bin/setup-shopware | ||
cd $SW_DIR | ||
- name: Link plugin with shopware installation and install composer deps | ||
run: | | ||
composer config --working-dir=$GITHUB_WORKSPACE --no-plugins allow-plugins.phpstan/extension-installer true | ||
composer update --working-dir=$GITHUB_WORKSPACE -n | ||
cp -r $GITHUB_WORKSPACE/src/Frontend/NetzkollektivEasyCredit $PLUGIN_DIR | ||
- name: Install & activate Plugin | ||
run: | | ||
cd $SW_DIR | ||
$GITHUB_WORKSPACE/bin/setup-plugin | ||
php bin/console sw:generate:attributes | ||
php bin/console orm:generate:proxies | ||
- name: Deactivate & uninstall Plugin | ||
run: | | ||
cd $SW_DIR | ||
php bin/console sw:plugin:deactivate NetzkollektivEasyCredit | ||
php bin/console sw:plugin:uninstall NetzkollektivEasyCredit | ||
php bin/console sw:cache:clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
apt-get -y update && apt-get -y install mariadb-server | ||
|
||
echo "Starting mysql server" | ||
/usr/bin/mysqld_safe --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql >> /dev/null 2>&1 & | ||
|
||
while true; do | ||
sleep 1 | ||
|
||
exit_code=0 | ||
mysql -e ";" 2> /dev/null || exit_code=$? | ||
if [ "${exit_code}" -eq "0" ]; then | ||
echo "Started mysql server" | ||
|
||
echo "creating mysql user & database" | ||
mysql -e "CREATE DATABASE shopware" | ||
mysqladmin --user=root password 'root' | ||
exit | ||
fi | ||
done |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
ln -s $GITHUB_WORKSPACE $PLUGIN_DIR | ||
ls -lia $PLUGIN_DIR | ||
|
||
php bin/console sw:plugin:refresh | ||
php bin/console sw:plugin:list | ||
php bin/console sw:plugin:install NetzkollektivEasyCredit | ||
php bin/console sw:plugin:activate NetzkollektivEasyCredit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
git clone --depth=1 -b v5.7.17 https://github.com/shopware/shopware.git /opt/shopware | ||
cd /opt/shopware | ||
|
||
echo " | ||
DB_USER=root | ||
DB_PASSWORD=root | ||
DB_HOST=127.0.0.1 | ||
DB_NAME=shopware | ||
DB_PORT=3306 | ||
SW_HOST=localhost | ||
SW_BASE_PATH= | ||
SELENIUM_HOST=selenium | ||
ELASTICSEARCH_HOST=elasticsearch | ||
" > .env | ||
make init | ||
|
||
echo 'donwloading demo-data ...' | ||
php bin/console sw:store:download SwagDemoDataDE | ||
echo 'installing demo data ...' | ||
php bin/console sw:plugin:install --activate SwagDemoDataDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters