diff --git a/.env b/.env index aae3d01..8e7b033 100644 --- a/.env +++ b/.env @@ -12,5 +12,5 @@ APP_URL=http://apptemplate.localhost # # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" # DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" -DATABASE_URL=mysql://root:root@mysql:3306/apptemplate +DATABASE_URL=mysql://root:root@db:3306/apptemplate ###< doctrine/doctrine-bundle ### diff --git a/.github/workflows/registration.yml b/.github/workflows/registration.yml new file mode 100644 index 0000000..79358de --- /dev/null +++ b/.github/workflows/registration.yml @@ -0,0 +1,25 @@ +name: Test registration process +on: + push: + pull_request: + branches: + - main + +jobs: + test-registration-process: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Start containers + run: 'docker-compose up -d' + + - name: Install dependencies + run: 'docker-compose exec -T app composer install --no-interaction' + + - name: Run migrations + run: 'docker-compose exec -T app php bin/console doctrine:migrations:migrate' + + - name: Install app + run: 'docker-compose exec -T shopware php bin/console app:install AppTemplate' diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..481bf5c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3.8' + +services: + shopware: + image: dockware/play:latest + volumes: + - ./tests/manifest.xml:/var/www/html/custom/apps/AppTemplate/manifest.xml:ro + + app: + image: shopware/development:8.0-composer-2 + volumes: + - ./:/app:rw + + db: + image: mariadb:10.4 + environment: + MYSQL_DATABASE: apptemplate + MYSQL_USER: app + MYSQL_PASSWORD: app + MYSQL_ROOT_PASSWORD: root diff --git a/tests/manifest.xml b/tests/manifest.xml new file mode 100644 index 0000000..d86a3b9 --- /dev/null +++ b/tests/manifest.xml @@ -0,0 +1,17 @@ + + + + AppTemplate + + + shopware AG + MIT + (c) shopware AG + 1.0.0 + + + + http://app:8000/register + 01f17b06402f0a24e6d2b084a6d18a87 + +