E2E tests against Test Repository develop with Express Checkout ECP-8400 with test group express-checkout #198
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
name: Integration Test Repository Dispatch Pipeline | |
run-name: E2E tests against Test Repository ${{inputs.testBranch}} with Express Checkout ${{inputs.expressBranch}} with test group ${{inputs.testGroup}} | |
on: | |
workflow_dispatch: | |
inputs: | |
testBranch: | |
description: "Integration Test Repository Pipeline" | |
required: true | |
default: "develop" | |
expressBranch: | |
description: "Express Checkout Repository Pipeline" | |
required: true | |
default: "develop" | |
testGroup: | |
description: "Test group" | |
required: true | |
default: "all" | |
type: choice | |
options: | |
- all | |
- standard | |
- express-checkout | |
jobs: | |
build: | |
runs-on: | |
group: larger-runners | |
labels: ubuntu-latest-8-cores | |
timeout-minutes: 25 | |
env: | |
PHP_VERSION: "8.1" | |
MAGENTO_VERSION: "2.4.5" | |
ADYEN_API_KEY: ${{secrets.ADYEN_API_KEY}} | |
ADYEN_CLIENT_KEY: ${{secrets.ADYEN_CLIENT_KEY}} | |
ADYEN_MERCHANT: ${{secrets.ADYEN_MERCHANT}} | |
ADMIN_USERNAME: ${{secrets.MAGENTO_ADMIN_USERNAME}} | |
ADMIN_PASSWORD: ${{secrets.MAGENTO_ADMIN_PASSWORD}} | |
DONATION_ACCOUNT: ${{secrets.DONATION_ACCOUNT}} | |
DEPLOY_SAMPLEDATA: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Magento | |
run: docker-compose -f .github/docker-compose.yml run --rm web make magento | |
- name: Start web server in background | |
run: docker-compose -f .github/docker-compose.yml up -d web | |
- name: Setup permissions | |
run: docker exec magento2-container make fs | |
- name: Check install | |
run: docker exec magento2-container make sys-check | |
- name: Install plugin | |
run: docker exec -u www-data magento2-container make plugin | |
- 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: 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: Install Express module | |
if: ${{inputs.expressBranch != 'disable'}} | |
run: docker exec -u www-data magento2-container composer require adyen/adyen-magento2-expresscheckout:dev-${{inputs.expressBranch}} | |
- name: Enable Express module | |
if: ${{inputs.expressBranch != 'disable'}} | |
run: docker exec -u www-data magento2-container make enable-express | |
- 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 ${{inputs.testGroup}} | |
env: | |
INTEGRATION_TESTS_BRANCH: ${{inputs.testBranch}} | |
MAGENTO_ADMIN_USERNAME: ${{secrets.MAGENTO_ADMIN_USERNAME}} | |
MAGENTO_ADMIN_PASSWORD: ${{secrets.MAGENTO_ADMIN_PASSWORD}} | |
MAGENTO_BASE_URL: ${{secrets.MAGENTO_BASE_URL}} | |
PAYPAL_USERNAME: ${{secrets.PLAYWRIGHT_PAYPAL_USERNAME}} | |
PAYPAL_PASSWORD: ${{secrets.PLAYWRIGHT_PAYPAL_PASSWORD}} | |
GOOGLE_USERNAME: ${{secrets.GOOGLE_USERNAME}} | |
GOOGLE_PASSWORD: ${{secrets.GOOGLE_PASSWORD}} | |
WEBHOOK_USERNAME: admin | |
WEBHOOK_PASSWORD: 1234 | |
- name: Archive test result artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: html-report | |
path: test-report |