Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAYOSWXP-125: Shopware 6.6 compatibilty & BugFixes & Cypress-Tests #300

Merged
merged 45 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b9c6180
PAYOSWXP-125: replace logger
rommelfreddy Apr 4, 2024
4d70b5b
PAYOSWXP-125: improve controller/route registration
rommelfreddy Apr 4, 2024
756097f
PAYOSWXP-125: set technical name for payment methods
rommelfreddy Apr 4, 2024
ef2b33a
PAYOSWXP-125: replace payment-exceptions
rommelfreddy Apr 4, 2024
f35db3f
reformat code
rommelfreddy Apr 4, 2024
4a23071
PAYOSWXP-125: replace vuejs filters
rommelfreddy Apr 4, 2024
c7cb8e4
PAYOSWXP-125: rework payment settings interface (backend functionallity)
rommelfreddy Apr 5, 2024
568fa91
PAYOSWXP-125: rework birthday validator to fix SW6.6 compatibility
rommelfreddy Apr 5, 2024
8dc229e
PAYOSWXP-125: unzer: fix payment methods not correct available for B2B
rommelfreddy Apr 5, 2024
5b74c7f
unit-tests: make sure product numner is unqiue
rommelfreddy Apr 5, 2024
0d256b6
remove old files
rommelfreddy Apr 12, 2024
7245c4d
PAYOSWXP-125: admin: replace legacy slot-overrides
rommelfreddy Apr 5, 2024
dbd0769
PAYOSWXP-125: remove not required slot-overrides
rommelfreddy Apr 5, 2024
b6c808a
PAYOSWXP-125: fix create notification forward targets
rommelfreddy Apr 5, 2024
4891143
PAYOSWXP-125: rework capture/refund-actions for SW6.6 compatibility
rommelfreddy Apr 5, 2024
2f182f6
PAYOSWXP-125: unit-test: fix that multiple DFP-tests will leads into …
rommelfreddy Apr 11, 2024
c41643d
PAYOSWXP-125: unit-test: replace old SalesChannelContext-Generator & …
rommelfreddy Apr 12, 2024
1741764
PAYOSWXP-125: unit-test: redirect-url-cleanup-test: make sure that ta…
rommelfreddy Apr 12, 2024
6c748f8
PAYOSWXP-125: validation: fix validation-textes
rommelfreddy Apr 12, 2024
a42abed
PAYOSWSXP-125: add additional validations to payment handlers
rommelfreddy Apr 12, 2024
62f34c2
PAYOSWXP-125: implement cypress tests & fix a few frontend issues
rommelfreddy Apr 12, 2024
e39ec72
build storefront/administration
rommelfreddy Apr 12, 2024
82af5dc
fix code-styles
rommelfreddy Apr 12, 2024
59ceaef
PAYOSWXP-126: remove workorder-id from transaktion-data
rommelfreddy Apr 12, 2024
a77fcd2
rector: add autoload
rommelfreddy Apr 12, 2024
3c9e687
add shopware 6.6 to pipeline
rommelfreddy Apr 12, 2024
b984755
github pipeline: adjust to standardized pipeline file
rommelfreddy Apr 12, 2024
cdd4353
SQUASH: PAYOSWXP-125: rework capture/refund-actions for SW6.6 compati…
rommelfreddy Apr 17, 2024
0cdb6dc
refactoring: better DI for abstractRequestParameterBuilder & minimize…
rommelfreddy Apr 17, 2024
75fbf07
PAYOSWXP-125: phoneNumber: store in address & fix validations
rommelfreddy Apr 17, 2024
2a10c3a
refactoring: remove unused imports
rommelfreddy Apr 17, 2024
4a92879
PAYOSWXP-125: birthday: store in customer-account & fix validations
rommelfreddy Apr 17, 2024
c61be14
build administration
rommelfreddy Apr 18, 2024
2929345
add shopware-extension.yml & build storefront/administration
rommelfreddy Apr 18, 2024
92be8c2
unit-testing: reduce creating entities to improve performance
rommelfreddy Apr 18, 2024
e6b19d5
github action: remove xdebug to improve unit-testing performance
rommelfreddy Apr 19, 2024
fbc0fa1
add payment filter for total-amount <= 0
rommelfreddy Apr 19, 2024
7d9a270
PAYOSWXP-125: express-checkout: store workorder-id separate in context
rommelfreddy Apr 19, 2024
b9fef7d
make usage of constant for payonePhone & payoneBirthday
rommelfreddy Apr 19, 2024
8379f9f
make usage of constant for workorder & carthash
rommelfreddy Apr 19, 2024
27610cb
unzer installment: fix issue that installment can not calculated on u…
rommelfreddy Apr 20, 2024
8306022
PAYOSWSXP-125: add validation for empty workorder-id & cart-hash-id
rommelfreddy Apr 20, 2024
c66db9a
fix cypress test
rommelfreddy Apr 20, 2024
ce2a3df
PAYOSWXP-138: saving customer information: add switch to enable/disable
rommelfreddy Apr 29, 2024
e19c5b1
PAYOSWXP-139: fix sw 6.5 compatibility
rommelfreddy May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
246 changes: 140 additions & 106 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,113 +1,147 @@
name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

env:
MODULE_NAME: PayonePayment
COMPOSER_NAME: payone-gmbh/shopware-6
TEST_DATABASE_URL: "mysql://root:[email protected]:3306/shopware"
MODULE_NAME: PayonePayment
MODULE_DIR: custom/plugins/PayonePayment
COMPOSER_NAME: payone-gmbh/shopware-6
TEST_DATABASE_URL: "mysql://root:[email protected]:3306/shopware"

jobs:
ci-current:
name: SW ${{ matrix.shopware-versions }}, PHP ${{ matrix.php-versions }}, MySQL ${{ matrix.mysql-versions }}
runs-on: ubuntu-latest
strategy:
max-parallel: 15
fail-fast: false
matrix:
php-versions: [ '8.1', '8.2' ]
mysql-versions: [ '5.7', '8.0' ]
shopware-versions: [ 'v6.5.0.0', 'v6.5.1.0', 'v6.5.2.0', 'v6.5.3.0', 'v6.5.4.0', 'v6.5.5.0', 'v6.5.6.0', 'v6.5.7.3' ]
services:
mysql:
image: mysql:${{ matrix.mysql-versions }}
env:
MYSQL_DATABASE: shopware
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306

steps:
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xdebug, curl, dom, fileinfo, gd, iconv, intl, json, xml, mbstring, pdo, phar, zip, sodium, pdo_mysql
tools: composer:2.2

- name: "Check PHP Version"
run: php -v

- name: "Check Composer Version"
run: composer -V

- name: "Check PHP Extensions"
run: php -m

- name: "checkout Shopware"
uses: actions/checkout@v3
with:
repository: shopware/production
ref: 'flex'

- name: "Checkout ${{ env.COMPOSER_NAME }}"
uses: actions/checkout@v3
with:
path: custom/plugins/${{ env.MODULE_NAME }}

- name: "Get composer cache directory"
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: "Cache Composer dependencies"
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.operating-system }}-${{ matrix.php-versions }}-${{ matrix.shopware-versions }}-${{ hashFiles('**/composer.lock') }}

- name: "Install Shopware dependencies"
# Install Shopware with --no-dev to prevent that dev-tools of the module got in conflict with the tools of shopware
run: |
composer req shopware/administration:${{ matrix.shopware-versions }} shopware/core:${{ matrix.shopware-versions }} shopware/elasticsearch:${{ matrix.shopware-versions }} shopware/storefront:${{ matrix.shopware-versions }} --no-update
composer install --no-dev

- name: "Install ${{ env.COMPOSER_NAME }}"
run: composer req ${{ env.COMPOSER_NAME }}

- name: "Install DEV-Tools"
working-directory: custom/plugins/${{ env.MODULE_NAME }}
run: |
composer remove shopware/* --no-update
composer install

- name: "Run PHPStan"
working-directory: custom/plugins/${{ env.MODULE_NAME }}
run: ./vendor/bin/phpstan

- name: "Check Code style (easy-coding-style)"
working-directory: custom/plugins/${{ env.MODULE_NAME }}
run: ./vendor/bin/ecs

- name: "Check Code style (rector)"
working-directory: custom/plugins/${{ env.MODULE_NAME }}
run: ./vendor/bin/rector --dry-run

- name: "Install Shopware"
run: |
echo APP_ENV=dev >> .env
echo APP_URL=http://localhost >> .env
echo DATABASE_URL=${{ env.TEST_DATABASE_URL }} >> .env
echo APP_SECRET=secretf0rt3st >> .env
bin/console system:install --basic-setup

- name: "Run PHPUnit Tests"
working-directory: custom/plugins/${{ env.MODULE_NAME }}
run: ./vendor/bin/phpunit --testdox
permissions:
contents: read

jobs:
ci-current:
name: SW ${{ matrix.shopware-version }}, PHP ${{ matrix.php-version }}, MySQL ${{ matrix.mysql-version }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '8.1', '8.2' ]
mysql-version: [ '5.7', '8.0' ]
shopware-version: [ 'v6.5.0.0', 'v6.5.1.0', 'v6.5.2.0', 'v6.5.3.0', 'v6.5.4.0', 'v6.5.5.0', 'v6.5.6.0', 'v6.5.7.3', 'v6.6.0.0', 'v6.6.1.0' ]
include:
- php-version: "8.3"
mysql-version: "8.0"
shopware-version: "v6.6.0.0"
- php-version: "8.3"
mysql-version: "8.0"
shopware-version: "v6.6.1.0"
exclude:
- php-version: "8.1"
shopware-version: "v6.6.0.0"
- mysql-version: "5.7"
shopware-version: "v6.6.0.0"
- php-version: "8.1"
shopware-version: "v6.6.1.0"
- mysql-version: "5.7"
shopware-version: "v6.6.1.0"
fail-fast: false
max-parallel: 10
services:
mysql:
image: mysql:${{ matrix.mysql-version }}
env:
MYSQL_DATABASE: shopware
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
steps:

- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, curl, dom, fileinfo, gd, iconv, intl, json, xml, mbstring, pdo, phar, zip, sodium, pdo_mysql
tools: composer:2.2
coverage: none # we should implement code-coverage-report in the future if we have more tests for everything

- name: "Check PHP Version"
run: php -v

- name: "Check Composer Version"
run: composer -V

- name: "Check PHP Extensions"
run: php -m

- name: "checkout Shopware"
uses: actions/checkout@v3
with:
repository: shopware/production
ref: ${{ matrix.shopware-version }}

- name: "Checkout ${{ env.COMPOSER_NAME }}"
uses: actions/checkout@v3
with:
path: ${{ env.MODULE_DIR }}

- name: "Get composer cache directory"
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: "Cache Composer dependencies"
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.operating-system }}-${{ matrix.php-version }}-${{ matrix.shopware-version }}-${{ hashFiles('**/composer.lock') }}

- name: "Install Shopware dependencies"
# Install Shopware with --no-dev to prevent that dev-tools of the module got in conflict with the tools of shopware
run: |
composer req shopware/core:${{ matrix.shopware-version }} shopware/administration:* shopware/storefront:* --no-update
composer remove shopware/elasticsearch --no-update
composer install

- name: "Install ${{ env.COMPOSER_NAME }}"
run: |
composer config prefer-stable true
composer config minimum-stability dev
composer config repositories.local-plugins '{ "type": "path", "url": "custom/plugins/*", "options": { "symlink": true } }'
composer req ${{ env.COMPOSER_NAME }} --no-scripts

- name: "Install DEV-Tools"
working-directory: ${{ env.MODULE_DIR }}
run: |
composer remove shopware/* --no-update
composer install

- name: "Run PHPStan"
working-directory: ${{ env.MODULE_DIR }}
run: ./vendor/bin/phpstan

- name: "Check Code style (easy-coding-style)"
working-directory: ${{ env.MODULE_DIR }}
run: ./vendor/bin/ecs

- name: "Check Code style (rector)"
working-directory: ${{ env.MODULE_DIR }}
run: ./vendor/bin/rector --dry-run

# Workaround. The variables are required for shopware to work properly during unit-testing
- name: "Install Shopware for unit-testing"
run: |
echo DATABASE_URL=${{ env.TEST_DATABASE_URL }} >> .env
echo MAILER_DSN=null://null >> .env
echo OPENSEARCH_URL=http://localhost:9200 >> .env
echo LOCK_DSN=flock >> .env
echo MAILER_DSN=null://null >> .env
echo APP_SECRET=se$cr$t >> .env
echo REDIS_CACHE_HOST=127.0.0.1 >> .env
echo REDIS_CACHE_PORT=123 >> .env
echo REDIS_SESSION_HOST=127.0.0.1 >> .env
echo REDIS_SESSION_PORT=123 >> .env
echo SHOPWARE_HTTP_CACHE_ENABLED=0 >> .env
echo STOREFRONT_PROXY_URL=http://localhost:80 >> .env
bin/console system:install --basic-setup

- name: "Run PHPUnit Tests"
working-directory: custom/plugins/${{ env.MODULE_NAME }}
run: SYMFONY_DEPRECATIONS_HELPER=disabled ./vendor/bin/phpunit --testdox
Loading
Loading