Skip to content

fix: add changelog entry #1459

fix: add changelog entry

fix: add changelog entry #1459

Workflow file for this run

name: integration
on:
push:
branches:
- trunk
pull_request:
merge_group:
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
check:
if: always()
needs: [build-zip, test-install-zip, phpunit, acceptance]
runs-on: ubuntu-latest
steps:
- uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: '["acceptance"]'
build-zip:
runs-on: ubuntu-latest
outputs:
artifact-url: ${{ steps.upload.outputs.artifact-url }}
steps:
- name: Build and validate zip
uses: shopware/github-actions/build-zip@main
with:
extensionName: ${{ github.event.repository.name }}
test-install-zip:
needs: build-zip
runs-on: ubuntu-latest
strategy:
matrix:
PLATFORM_BRANCH: ["v6.7.0.0", "trunk"]
steps:
- name: Checkout SwagPayPal
uses: actions/checkout@v4
with:
path: custom/plugins/${{ github.event.repository.name }}
- name: Test install zip
uses: ./custom/plugins/SwagPayPal/.github/actions/setup-paypal
with:
extension-zip: ${{ needs.build-zip.outputs.artifact-url }}
shopware-version: ${{ matrix.PLATFORM_BRANCH }}
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
MYSQL_IMAGE: ["mysql:8.0"]
PLATFORM_BRANCH: ["v6.7.0.0", "trunk"]
PHP_VERSION: ["8.2", "8.3", "8.4"]
WITH_COMMERCIAL: [true]
include:
# without commercial, 6.7.0.0
- WITH_COMMERCIAL: false
PLATFORM_BRANCH: "v6.7.0.0"
MYSQL_IMAGE: "mysql:8.0"
PHP_VERSION: "8.4"
# without commercial, trunk
- WITH_COMMERCIAL: false
PLATFORM_BRANCH: "trunk"
MYSQL_IMAGE: "mysql:8.0"
PHP_VERSION: "8.4"
# mariadb
- WITH_COMMERCIAL: true
PLATFORM_BRANCH: "trunk"
MYSQL_IMAGE: "mariadb:10.11"
PHP_VERSION: "8.2"
env:
REDIS_URL: redis://localhost:6379
services:
redis:
image: redis:alpine
ports:
- "6379:6379"
steps:
- name: Checkout SwagPayPal
uses: actions/checkout@v4
with:
path: custom/plugins/${{ github.event.repository.name }}
- name: Setup SwagPayPal
uses: ./custom/plugins/SwagPayPal/.github/actions/setup-paypal
with:
install-commercial: ${{ matrix.WITH_COMMERCIAL }}
install-admin: true
install-storefront: true
mysql-version: ${{ matrix.MYSQL_IMAGE }}
php-version: ${{ matrix.PHP_VERSION }}
shopware-version: ${{ matrix.PLATFORM_BRANCH }}
- name: Run PHPUnit
working-directory: custom/plugins/${{ github.event.repository.name }}
run: composer phpunit -- --coverage-cobertura cobertura.xml --coverage-text --only-summary-for-coverage-text
acceptance:
needs: test-install-zip
if: (needs.test-install-zip.result == 'success' && contains(github.event.pull_request.labels.*.name, 'run/acceptance')) || github.event_name != 'pull_request'
runs-on: ubuntu-latest
environment: acceptance-production
services:
redis:
image: redis:7.0
ports:
- '9200:9200'
mailpit:
image: axllent/mailpit:latest
ports:
- '1025:1025'
- '8025:8025'
env:
APP_ENV: prod
APP_DEBUG: '1'
MAILER_DSN: smtp://localhost:1025
PLUGIN_PATH: ./paypal
MONOLOG_CONFIG: |
monolog:
handlers:
paypal:
type: stream
level: debug
channels: [paypal]
path: '%kernel.project_dir%/paypal/tests/acceptance/paypal.log'
steps:
- uses: actions/checkout@v5
with:
path: ${{ env.PLUGIN_PATH }}
- name: Download zip
uses: actions/download-artifact@v5
with:
name: SwagPayPal.zip
- name: Setup SwagPayPal
uses: ./paypal/.github/actions/setup-paypal
with:
extension-zip: SwagPayPal.zip
env: prod
install-admin: true
install-storefront: true
install-commercial: true
- uses: actions/checkout@v5
with:
path: ${{ env.PLUGIN_PATH }}
- name: Setup acceptance
uses: ./paypal/.github/actions/setup-acceptance
with:
path: ${{ env.PLUGIN_PATH }}/tests/acceptance
- name: Prepare logging
run: echo "$MONOLOG_CONFIG" > ./config/packages/monolog.yaml
- name: Prepare environment variables
run: |
symfony console cache:clear --env="${APP_ENV}" || true
echo "APP_URL=${APP_URL}" >> "${PLUGIN_PATH}/tests/acceptance/.env"
symfony console integration:create AcceptanceTest --admin >> "${PLUGIN_PATH}/tests/acceptance/.env"
- name: Run playwright
working-directory: ${{ env.PLUGIN_PATH }}/tests/acceptance
run: npx playwright test --reporter=${{ github.event.act && 'line' || 'github' }} --trace=on-first-retry
env:
PAYPAL_CLIENT_ID: ${{ secrets.PAYPAL_CLIENT_ID }}
PAYPAL_CLIENT_SECRET: ${{ secrets.PAYPAL_CLIENT_SECRET }}
PAYPAL_MERCHANT_ID: ${{ secrets.PAYPAL_MERCHANT_ID }}
PAYPAL_SANDBOX: ${{ secrets.PAYPAL_SANDBOX }}
- name: Compress and encrypt test-results
if: always()
working-directory: ${{ env.PLUGIN_PATH }}/tests/acceptance
run: zip -r -P "${{ secrets.ARTIFACT_PASSWORD }}" test-results.zip test-results/ paypal.log
- uses: actions/upload-artifact@v4
if: always()
with:
name: acceptance-test-result
path: ${{ env.PLUGIN_PATH }}/tests/acceptance/test-results.zip
retention-days: 3