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

Candemiralp patch 1 #2774

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 57 additions & 26 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,40 @@
name: Magento 2 E2E Pipeline
run-name: Adyen Magento 2 Payment Plugin E2E tests
on: [pull_request, pull_request_target]
name: Adyen Magento 2 E2E test workflow
run-name: E2E tests against Test Repository ${{inputs.testBranch || 'main'}} with test group ${{inputs.testGroup || 'standard'}} and express branch ${{inputs.expressBranch || 'none'}}

on:
pull_request:
pull_request_target:
workflow_dispatch:
inputs:
testBranch:
description: "Integration Test Repository Pipeline"
required: true
default: "develop"
testGroup:
description: "Test group"
required: true
default: "standard"
type: choice
options:
- all
- standard
- express-checkout
expressBranch:
description: "Express Checkout Repository Pipeline"
required: true
default: "main"

jobs:
build:
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository)
environment: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) && 'external' || 'internal' }}
# if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository)
# environment: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) && 'external' || 'internal' }}
strategy:
matrix:
php-version: ["8.3"]
magento-version: ["2.4.7-p2"]
runs-on:
group: larger-runners
labels: ubuntu-latest-8-cores
runs-on: ubuntu-latest
# group: larger-runners
# labels: ubuntu-latest-8-cores
timeout-minutes: 25
env:
PHP_VERSION: ${{ matrix.php-version }}
Expand Down Expand Up @@ -45,35 +67,44 @@ jobs:
- name: Kill Cron Jobs
run: docker exec magento2-container /etc/init.d/cron stop

- name: Checkout developer module
uses: actions/checkout@v3
with:
repository: Adyen/adyen-magento2-dev
ref: "main"
token: ${{ secrets.ADYEN_AUTOMATION_BOT_TEST_ACCESS_TOKEN }}
path: Developer

- name: Make the folder for dev module
run: docker exec -u www-data magento2-container mkdir -p /var/www/html/app/code/Adyen
# - name: Checkout developer module
# uses: actions/checkout@v3
# with:
# repository: Adyen/adyen-magento2-dev
# ref: "main"
# token: ${{ secrets.ADYEN_AUTOMATION_BOT_TEST_ACCESS_TOKEN }}
# path: Developer
#
# - name: Make the folder for dev module
# run: docker exec -u www-data magento2-container mkdir -p /var/www/html/app/code/Adyen
#
# - name: Copy dev module into Docker container
# run: docker cp ./Developer magento2-container:/var/www/html/app/code/Adyen
#
# - name: Change ownership of developer module folder
# run: docker exec magento2-container chown -R www-data:www-data /var/www/html/app/code/Adyen/Developer
#
# - name: Enable developer module
# run: docker exec -u www-data magento2-container make dev-module

- name: Copy dev module into Docker container
run: docker cp ./Developer magento2-container:/var/www/html/app/code/Adyen
- name: Install Express module
if: ${{contains(fromJSON('["all", "express-checkout"]'), inputs.testGroup)}}
run: docker exec -u www-data magento2-container composer require adyen/adyen-magento2-expresscheckout:dev-${{inputs.expressBranch}}

- name: Change ownership of developer module folder
run: docker exec magento2-container chown -R www-data:www-data /var/www/html/app/code/Adyen/Developer
- name: Enable Express module
if: ${{contains(fromJSON('["all", "express-checkout"]'), inputs.testGroup)}}
run: docker exec -u www-data magento2-container make enable-express

- name: Enable developer module
run: docker exec -u www-data magento2-container make dev-module
- name: Switch to production mode
run: docker exec -u www-data magento2-container make production

- name: Setup permissions
run: docker exec magento2-container make fs

- name: Run E2E tests
run: docker compose -f .github/docker-compose.e2e.yml run --rm playwright /e2e.sh standard
run: docker compose -f .github/docker-compose.e2e.yml run --rm playwright /e2e.sh ${{inputs.testGroup || 'standard'}}
env:
INTEGRATION_TESTS_BRANCH: develop
INTEGRATION_TESTS_BRANCH: ${{inputs.testBranch || 'develop'}}
MAGENTO_ADMIN_USERNAME: ${{secrets.MAGENTO_ADMIN_USERNAME}}
MAGENTO_ADMIN_PASSWORD: ${{secrets.MAGENTO_ADMIN_PASSWORD}}
MAGENTO_BASE_URL: ${{secrets.MAGENTO_BASE_URL}}
Expand Down
2 changes: 2 additions & 0 deletions Controller/Return/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// phpcs:ignore
namespace Adyen\Payment\Controller\Return;

// This is a test line

use Adyen\Payment\Helper\PaymentResponseHandler;
use Adyen\Payment\Helper\PaymentsDetails;
use Adyen\Payment\Helper\Quote;
Expand Down
Loading