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

Release 3.10.0 #350

Merged
merged 7 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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