Skip to content

Commit

Permalink
Merge pull request #350 from Adyen/develop
Browse files Browse the repository at this point in the history
Release 3.10.0
  • Loading branch information
candemiralp authored Feb 16, 2023
2 parents f7f74ab + 70f7486 commit bff64bf
Show file tree
Hide file tree
Showing 18 changed files with 717 additions and 434 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: E2E Test
run-name: Headless E2E tests for Adyen Shopware Plugin

on: [pull_request]

jobs:
e2e:
name: Shopware 6 E2E
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
if: ${{ github.actor != 'renovate[bot]' || github.actor != 'lgtm-com[bot]' }}
# Prevent bots from initiating E2E pipeline
steps:
- name: Clone Code
uses: actions/checkout@v2

- name: Initiate Dockware
run: |
docker pull dockware/dev:latest
docker run --rm -p 443:443 --name shopware6 \
--mount type=bind,source="$(pwd)",target=/data/extensions/workdir \
--env PHP_VERSION=7.4 -d dockware/dev:latest
sleep 30
docker logs shopware6
docker exec shopware6 bash -c "mysql -u root -proot shopware -e \"UPDATE sales_channel_domain SET url='https://local.shopware.shop' WHERE url NOT LIKE 'default.%';\""
docker exec shopware6 bash -c \
"mysql -u root -proot shopware -e \"SELECT @RULE_ID := id FROM rule WHERE name = 'All customers'; UPDATE shipping_method SET availability_rule_id = @RULE_ID;\""
docker network create localnetwork
docker network connect --alias local.shopware.shop localnetwork shopware6
- name: Install/Configure Plugin
run: |
docker exec shopware6 bash -c "composer config --json repositories.local '{\"type\": \"path\", \"url\": \"/data/extensions/workdir\", \"options\": { \"symlink\": false } }'"
docker exec shopware6 bash -c 'composer require adyen/adyen-shopware6:*'
docker exec shopware6 bash -c 'php bin/console plugin:refresh'
docker exec shopware6 bash -c 'php bin/console plugin:install AdyenPaymentShopware6 --activate'
docker exec shopware6 bash -c 'php bin/console cache:clear'
docker exec shopware6 bash -c 'php bin/console system:config:set AdyenPaymentShopware6.config.apiKeyTest "${{secrets.ADYEN_API_KEY}}"'
docker exec shopware6 bash -c 'php bin/console system:config:set AdyenPaymentShopware6.config.merchantAccount "${{secrets.ADYEN_MERCHANT}}"'
docker exec shopware6 bash -c 'php bin/console system:config:set AdyenPaymentShopware6.config.clientKeyTest "${{secrets.ADYEN_CLIENT_KEY}}"'
docker exec shopware6 bash -c 'php bin/console adyen:payment-method:enable --all'
docker exec shopware6 bash -c 'php bin/console adyen:fetch-logos'
- name: Run E2E Tests
run: docker-compose -f .github/workflows/templates/docker-compose.playwright.yml run --rm playwright /e2e.sh
env:
INTEGRATION_TESTS_BRANCH: develop
SHOPWARE_BASE_URL: ${{secrets.SHOPWARE_BASE_URL}}
PAYPAL_USERNAME: ${{secrets.PLAYWRIGHT_PAYPAL_USERNAME}}
PAYPAL_PASSWORD: ${{secrets.PLAYWRIGHT_PAYPAL_PASSWORD}}

- name: Archive test result artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: html-report
path: test-report
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
php-version: ${{ matrix.php-version }}

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/scripts/e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail

# Checkout E2E tests
cd /tmp;
git clone https://github.com/Adyen/adyen-integration-tools-tests.git;
cd adyen-integration-tools-tests;
git checkout $INTEGRATION_TESTS_BRANCH;

# Setup environment
rm -rf package-lock.json;
npm i;

# Run tests
npm run test:ci:shopware
21 changes: 21 additions & 0 deletions .github/workflows/templates/docker-compose.playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3'

services:
playwright:
image: mcr.microsoft.com/playwright:focal
networks:
- localnetwork
shm_size: 1gb
ipc: host
cap_add:
- SYS_ADMIN
environment:
- INTEGRATION_TESTS_BRANCH
- SHOPWARE_BASE_URL
volumes:
- ../scripts/e2e.sh:/e2e.sh
- ../../../test-report:/tmp/test-report

networks:
localnetwork:
external: true
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
],
"description": "Official Shopware 6 Plugin to connect to Payment Service Provider Adyen",
"version": "3.9.0",
"version": "3.10.0",
"type": "shopware-platform-plugin",
"license": "MIT",
"require": {
Expand Down
Loading

0 comments on commit bff64bf

Please sign in to comment.