-
Notifications
You must be signed in to change notification settings - Fork 23
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 #350 from Adyen/develop
Release 3.10.0
- Loading branch information
Showing
18 changed files
with
717 additions
and
434 deletions.
There are no files selected for viewing
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,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 |
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,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 |
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,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 |
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
Oops, something went wrong.