-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1384 from Adyen/develop
Release 8.2.0
- Loading branch information
Showing
108 changed files
with
5,997 additions
and
2,829 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -1 +1 @@ | ||
* @AlexandrosMor @acampos1916 @rikterbeek @peterojo @morerice @tnaber @michaelpaul | ||
* @AlexandrosMor @acampos1916 @rikterbeek @peterojo @morerice @tnaber @michaelpaul @candemiralp |
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,56 @@ | ||
version: '3' | ||
|
||
services: | ||
db: | ||
image: mariadb:10.4 | ||
container_name: mariadb | ||
networks: | ||
- backend | ||
environment: | ||
MARIADB_ROOT_PASSWORD: root_password | ||
MARIADB_DATABASE: magento | ||
MARIADB_USER: magento | ||
MARIADB_PASSWORD: magento | ||
elastic: | ||
image: elasticsearch:7.16.2 | ||
container_name: elasticsearch | ||
networks: | ||
- backend | ||
ports: | ||
- 9200:9200 | ||
- 9300:9300 | ||
environment: | ||
- "discovery.type=single-node" | ||
- "ES_JAVA_OPTS=-Xms750m -Xmx750m" | ||
web: | ||
image: ataberkylmz/magento2:2.4.2 | ||
container_name: magento2-container | ||
networks: | ||
backend: | ||
aliases: | ||
- magento2.test.com | ||
environment: | ||
- DB_SERVER=mariadb | ||
- ELASTICSEARCH_SERVER=elasticsearch | ||
- MAGENTO_HOST=magento2.test.com | ||
- VIRTUAL_HOST=magento2.test.com | ||
- ADMIN_URLEXT=admin | ||
- ADMIN_USERNAME | ||
- ADMIN_PASSWORD | ||
|
||
depends_on: | ||
- db | ||
- elastic | ||
volumes: | ||
- ../:/data/extensions/workdir | ||
- ./scripts/mftf.sh:/var/www/html/mftf.sh | ||
|
||
## Selenium for MFTF tests | ||
selenium: | ||
image: selenium/standalone-chrome-debug:3.8.1 | ||
ports: | ||
- "5900:5900" | ||
networks: | ||
- backend | ||
networks: | ||
backend: |
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,37 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# Install plugin | ||
composer config --json repositories.local '{"type": "path", "url": "/data/extensions/workdir", "options": { "symlink": false } }' | ||
composer require "adyen/module-payment:*" | ||
bin/magento module:enable Adyen_Payment | ||
bin/magento setup:upgrade | ||
bin/magento setup:di:compile | ||
bin/magento cache:flush | ||
|
||
# Configuration | ||
bin/magento config:set currency/options/allow USD,EUR | ||
bin/magento config:set currency/options/default USD | ||
bin/magento config:set currency/options/base USD | ||
|
||
bin/magento config:set cms/wysiwyg/enabled disabled | ||
bin/magento config:set admin/security/admin_account_sharing 1 | ||
bin/magento config:set admin/security/use_form_key 0 | ||
bin/magento cache:clean config full_page | ||
|
||
# Build test project | ||
vendor/bin/mftf build:project | ||
|
||
# Edit environmental settings | ||
rm -f dev/tests/acceptance/.env; | ||
vendor/bin/mftf setup:env \ | ||
--MAGENTO_BASE_URL "http://${MAGENTO_HOST}/" \ | ||
--MAGENTO_BACKEND_NAME $ADMIN_URLEXT \ | ||
--MAGENTO_ADMIN_USERNAME $ADMIN_USERNAME \ | ||
--MAGENTO_ADMIN_PASSWORD $ADMIN_PASSWORD \ | ||
--BROWSER chrome \ | ||
--ELASTICSEARCH_VERSION 7; | ||
echo 'SELENIUM_HOST=selenium' >> dev/tests/acceptance/.env; | ||
|
||
# Enable the Magento CLI commands | ||
cp dev/tests/acceptance/.htaccess.sample dev/tests/acceptance/.htaccess |
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,45 @@ | ||
name: Functional Tests | ||
on: [workflow_dispatch, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- PHP_VERSION: 7.4 | ||
MAGENTO_VERSION: 2.4.2 | ||
runs-on: ubuntu-latest | ||
env: | ||
ADMIN_USERNAME: ${{ secrets.MAGENTO_ADMIN_USERNAME }} | ||
ADMIN_PASSWORD: ${{ secrets.MAGENTO_ADMIN_PASSWORD }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Start services | ||
run: docker-compose -f .github/docker-compose.yml up -d | ||
|
||
# Temp solution to wait for install script to run | ||
- name: Sleep for 120 seconds | ||
run: sleep 120s | ||
shell: bash | ||
|
||
- name: Show install logs | ||
run: docker logs --tail 100 magento2-container | ||
|
||
- name: Prevent cron from interfering with test execution | ||
run: docker exec magento2-container /etc/init.d/cron stop | ||
|
||
- name: Build MFTF project | ||
run: docker exec magento2-container ./mftf.sh | ||
|
||
- name: Check setup | ||
run: docker exec magento2-container vendor/bin/mftf doctor | ||
|
||
- name: Run MFTF tests | ||
run: docker exec magento2-container vendor/bin/mftf run:group --remove AdyenMagentoSuite | ||
|
||
- name: Retry once on failure | ||
run: docker exec magento2-container vendor/bin/mftf run:failed | ||
|
||
- name: Shutdown | ||
run: docker-compose -f .github/docker-compose.yml down --volumes |
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,76 @@ | ||
name: Integration Tests | ||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- PHP_VERSION: 7.4 | ||
MAGENTO_VERSION: 2.4.2 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Create docker image | ||
run: MAGENTO_USERNAME=${{ secrets.MAGENTO_USERNAME }} MAGENTO_PASSWORD=${{ secrets.MAGENTO_PASSWORD }} docker-compose -f .github/workflows/templates/docker-compose.yml up -d | ||
|
||
# Temp solution to wait for install script to run | ||
- name: Sleep for 120 seconds | ||
uses: jakejarvis/wait-action@master | ||
with: | ||
time: '120s' | ||
|
||
- name: Show install logs | ||
run: docker logs magento2-container | ||
|
||
- name: Prevent cron from interfering with test execution | ||
run: docker exec magento2-container /etc/init.d/cron stop | ||
|
||
- name: Install N98-Magerun | ||
run: | | ||
docker exec magento2-container wget -q https://files.magerun.net/n98-magerun2.phar | ||
docker exec magento2-container chmod +x ./n98-magerun2.phar | ||
- name: Check install | ||
run: docker exec magento2-container ./n98-magerun2.phar sys:check | ||
|
||
- name: Enable developer mode | ||
run: docker exec magento2-container bin/magento deploy:mode:set developer | ||
|
||
- name: Register local repository | ||
run: | | ||
docker exec magento2-container composer config --json repositories.local '{"type": "path", "url": "/data/extensions/workdir", "options": { "symlink": false } }' | ||
- name: Install local package | ||
run: docker exec magento2-container composer require "adyen/module-payment:*" | ||
|
||
- name: Enable module | ||
run: docker exec magento2-container bin/magento module:enable Adyen_Payment | ||
|
||
- name: Setup upgrade | ||
run: docker exec magento2-container bin/magento setup:upgrade | ||
|
||
- name: Generate code | ||
run: docker exec magento2-container bin/magento setup:di:compile | ||
|
||
- name: Clear cache | ||
run: docker exec magento2-container bin/magento cache:flush | ||
|
||
- name: Configure the plugin | ||
run: | | ||
docker exec magento2-container bin/magento config:set payment/adyen_abstract/demo_mode 1 | ||
docker exec magento2-container bin/magento config:set payment/adyen_hpp/active 1 | ||
docker exec magento2-container bin/magento config:set payment/adyen_abstract/merchant_account "${{secrets.ADYEN_MERCHANT}}" | ||
docker exec magento2-container ./n98-magerun2.phar config:store:set --encrypt payment/adyen_abstract/api_key_test "${{secrets.ADYEN_API_KEY}}" > /dev/null | ||
- name: Run unit tests | ||
run: docker exec magento2-container vendor/bin/phpunit vendor/adyen/module-payment/Test/Unit | ||
|
||
- name: Run GraphQL tests | ||
run: | | ||
docker exec -w $MAGENTO_ROOT/dev/tests/api-functional magento2-container $MAGENTO_ROOT/vendor/bin/phpunit --configuration $MAGENTO_ROOT/$PHPUNIT_CONFIG $MAGENTO_ROOT/$TEST_SUITE | ||
env: | ||
MAGENTO_ROOT: /var/www/html | ||
PHPUNIT_CONFIG: vendor/adyen/module-payment/Test/api-functional/phpunit_graphql.xml | ||
TEST_SUITE: vendor/adyen/module-payment/Test/api-functional/GraphQl |
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,37 @@ | ||
version: '3' | ||
|
||
services: | ||
db: | ||
image: mariadb:10.4 | ||
container_name: mariadb | ||
environment: | ||
MARIADB_ROOT_PASSWORD: root_password | ||
MARIADB_DATABASE: magento | ||
MARIADB_USER: magento | ||
MARIADB_PASSWORD: magento | ||
elastic: | ||
image: elasticsearch:7.16.2 | ||
container_name: elasticsearch | ||
ports: | ||
- 9200:9200 | ||
- 9300:9300 | ||
environment: | ||
- "discovery.type=single-node" | ||
- ES_JAVA_OPTS=-Xms750m -Xmx750m | ||
web: | ||
image: ataberkylmz/magento2:2.4.2 | ||
container_name: magento2-container | ||
extra_hosts: | ||
- "magento2.test.com:127.0.0.1" | ||
environment: | ||
DB_SERVER: mariadb | ||
ELASTICSEARCH_SERVER: elasticsearch | ||
MAGENTO_HOST: magento2.test.com | ||
VIRTUAL_HOST: magento2.test.com | ||
ADMIN_USERNAME: ${MAGENTO_USERNAME} | ||
ADMIN_PASSWORD: ${MAGENTO_PASSWORD} | ||
depends_on: | ||
- db | ||
- elastic | ||
volumes: | ||
- ../../../:/data/extensions/workdir |
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
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,38 @@ | ||
<?php | ||
|
||
namespace Adyen\Payment\Console\Command; | ||
|
||
use Adyen\Payment\Cron\WebhookProcessor\Proxy as WebhookProcessor; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
class WebhookProcessorCommand extends Command | ||
{ | ||
/** | ||
* @var WebhookProcessor | ||
*/ | ||
private $webhookProcessor; | ||
|
||
public function __construct(WebhookProcessor $webhookProcessor) | ||
{ | ||
$this->webhookProcessor = $webhookProcessor; | ||
parent::__construct(); | ||
} | ||
|
||
protected function configure() | ||
{ | ||
$this->setName('adyen:webhook:run'); | ||
parent::configure(); | ||
} | ||
|
||
/** | ||
* @throws \Exception | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$output->writeln('Starting webhook processor.'); | ||
$this->webhookProcessor->execute(); | ||
$output->writeln('Completed webhook processor execution.'); | ||
} | ||
} |
Oops, something went wrong.