Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
Test registration process
Browse files Browse the repository at this point in the history
  • Loading branch information
fschmtt committed Jan 3, 2022
1 parent 0c9509d commit c0a5884
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ APP_URL=http://apptemplate.localhost
#
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://db_user:[email protected]: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 ###
25 changes: 25 additions & 0 deletions .github/workflows/registration.yml
Original file line number Diff line number Diff line change
@@ -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'
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions tests/manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/platform/master/src/Core/Framework/App/Manifest/Schema/manifest-1.0.xsd">
<meta>
<name>AppTemplate</name>
<label>AppTemplate</label>
<label lang="de-DE">AppTemplate</label>
<author>shopware AG</author>
<license>MIT</license>
<copyright>(c) shopware AG</copyright>
<version>1.0.0</version>
</meta>

<setup>
<registrationUrl>http://app:8000/register</registrationUrl>
<secret>01f17b06402f0a24e6d2b084a6d18a87</secret>
</setup>
</manifest>

0 comments on commit c0a5884

Please sign in to comment.