diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..056169d44 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ +### 1. Why is this change necessary? + +// Please link to the relevant issues, if they exists, or explain the solved issue here. e.g. +// closes https://github.com/shopware/shopware/issues/{ISSUE_NUMBER} + +### 2. What does this change do, exactly? + +// Shortly explain how your change solves the issue +// If the issue has more than one obvious solution, +// shortly explain your reasoning for your chosen approach + +### 3. Describe each step to reproduce the issue or behaviour. + + +### 5. Checklist + +- [ ] I have created the PR in draft status and only open it when it's ready for review +- [ ] If the change is large: I have thought about splitting it up into smaller PRs +- [ ] I have written tests and if it's a bug fix verified that they fail without my change or that new code is covered by tests +- [ ] I have updated developer-facing release notes if this change affects external developers +- [ ] I have written or adjusted the documentation according to my changes +- [ ] I added the correct package annotation to each `src` file (not strictly necessary for tests) +- [ ] This change has code comments where appropriate, especially for non-obvious lines of code +- [ ] Ensure the pull request title as well as first commit follows conventional commits +- [ ] I have thought about well-defined extension points and marked everything else as `@internal` / `@private` diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 1657d96f2..000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,199 +0,0 @@ -variables: - PLUGIN_NAME: SwagMigrationAssistant - PLATFORM_MIN_VERSION: 'v6.6.1.0' - PLATFORM_DEFAULT_VERSION: 'trunk' - PLATFORM_BRANCH: $PLATFORM_DEFAULT_VERSION - DEV_IMAGE: - value: ${CI_REGISTRY}/infrastructure/docker-base/ci-build:latest - NODE_VERSION: 20 - -include: - - project: 'shopware/6/product/platform' - ref: 'trunk' - file: '.gitlab/templates/plugin.yml' -# - component: gitlab.shopware.com/infrastructure/ci-component-library/kaniko-amd64@trunk -# inputs: -# job-suffix: "" -# stage: E2E -# destination-image: "${CI_REGISTRY_IMAGE}/ci-e2e" -# destination-tag: "${PLATFORM_BRANCH}-${CI_PIPELINE_ID}" -# dockerfile: .gitlab/Dockerfile -# enable-scan: "false" -# cache: "false" -# build-arg: "BASE_IMAGE=$PLATFORM_BASE_IMAGE" -# extra-args: "--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN" - -Danger: - stage: test - image: - name: ghcr.io/shyim/danger-php:latest - entrypoint: [ "" ] - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - before_script: [ ] - script: - - danger ci - -ecs: - stage: test - script: - - composer ecs - -Eslint (administration): - stage: test - variables: - APP_ENV: prod - ADMIN_PATH: $CI_PROJECT_DIR/src/Administration/Resources/app/administration - STOREFRONT_PATH: $CI_PROJECT_DIR/src/Storefront/Resources/app/storefront - script: - - '(cd $ADMIN_PATH && npm ci)' - - $CI_PROJECT_DIR/bin/console framework:schema -s 'entity-schema' $ADMIN_PATH/test/_mocks_/entity-schema.json - - npm --prefix $ADMIN_PATH run unit-setup - - composer admin:install - - composer admin:lint - -jest (administration): - rules: - # exists does not support variables, so we cannot use ${PLUGIN_SOURCE_DIR} here - - exists: - - tests/Jest/jest.config.js - variables: - APP_ENV: prod - ADMIN_PATH: $CI_PROJECT_DIR/src/Administration/Resources/app/administration - STOREFRONT_PATH: $CI_PROJECT_DIR/src/Storefront/Resources/app/storefront - script: - - '(cd $ADMIN_PATH && npm ci)' - - $CI_PROJECT_DIR/bin/console framework:schema -s 'entity-schema' $ADMIN_PATH/test/_mocks_/entity-schema.json - - npm --prefix $ADMIN_PATH run unit-setup - - composer admin:install - - composer admin:unit -- --ci - coverage: '/^\s?All files[^|]*\|[^|]*\s+([\d\.]+)/' - artifacts: - paths: - # allow inspection of the coverage report, otherwise it's not accessible - - custom/plugins/SwagMigrationAssistant/coverage/cobertura-coverage.xml - reports: - junit: - - custom/plugins/SwagMigrationAssistant/coverage/junit.xml - coverage_report: - coverage_format: cobertura - path: custom/plugins/SwagMigrationAssistant/coverage/cobertura-coverage.xml - -phpunit: - script: - - apt-get update && apt-get --assume-yes install default-mysql-client - - cd tests - - cd - - - mysql --skip_ssl -uroot -p"$MYSQL_ROOT_PASSWORD" --host mysql < tests/testData/sw55.sql - - php - -d pcov.enabled=1 -d pcov.directory=$PWD -d pcov.exclude='~(vendor|tests|node_modules)~' - ${PROJECT_ROOT}/vendor/bin/phpunit - --configuration phpunit.xml.dist - --log-junit ${CI_PROJECT_DIR}/phpunit.junit.xml - --colors=never - --coverage-cobertura ${CI_PROJECT_DIR}/cobertura.xml - --coverage-text #| grep -v -E '^Shopware\\|^ Methods:' # do not output covered files lines - parallel: - matrix: - - PLATFORM_BRANCH: [ $PLATFORM_MIN_VERSION, $PLATFORM_DEFAULT_VERSION ] - -phpstan: - script: - - composer dump-autoload --dev - - composer phpstan - -smoke-test: - stage: test - needs: [] - rules: - - !reference [.rules, skip] - - when: always - script: - - cd ../../.. - - php bin/console plugin:refresh - - php bin/console plugin:install --activate --clearCache ${PLUGIN_NAME} - - php bin/console plugin:uninstall ${PLUGIN_NAME} - -# disabled acceptance test, will be active as GH Action again after move to GitHub -#build image: -# variables: -# PLATFORM_BASE_IMAGE: ${CI_REGISTRY}/shopware/6/product/platform/ci-e2e:${PLATFORM_BRANCH} -# rules: -# # not supported, the downstream pipeline should find any issues anyway -# - if: "$CI_MERGE_REQUEST_LABELS =~ /.*branch::platform::match.*/" -# when: never -# - if: "$PARENT_PIPELINE_ID" -# when: never -# - when: always -# needs: [] -# parallel: -# matrix: -# - PLATFORM_BRANCH: [ $PLATFORM_MIN_VERSION, $PLATFORM_DEFAULT_VERSION ] -# -#build image downstream: -# extends: build image -# rules: -# - if: "$PARENT_PIPELINE_ID" -# needs: -# - pipeline: $PARENT_PIPELINE_ID -# job: build image -# artifacts: false -# -#acceptance: -# image: mcr.microsoft.com/playwright:v1.44.0-jammy -# stage: E2E -# needs: -# - job: build image -# optional: true -# - job: build image downstream -# optional: true -# rules: -# # not supported, the downstream pipeline should find any issues anyway -# - if: "$CI_MERGE_REQUEST_LABELS =~ /.*branch::platform::match.*/" -# when: never -# - when: always -# services: -# - name: mysql:8.3 -# alias: database -# entrypoint: -# [ -# "sh", -# "-c", -# "docker-entrypoint.sh mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --sql-require-primary-key=ON", -# ] -# - name: redis:7.0 -# alias: redis -# - name: "${CI_REGISTRY_IMAGE}/ci-e2e:${PLATFORM_BRANCH}-${CI_PIPELINE_ID}" -# alias: shopware.test -# variables: -# DATABASE_URL: mysql://root:app@database:3306/root -# parallel: -# matrix: -# - PLATFORM_BRANCH: [ $PLATFORM_MIN_VERSION, $PLATFORM_DEFAULT_VERSION ] -# variables: -# # CI_DEBUG_SERVICES: "true" # This can be used to display the output of all service containers for debugging -# APP_ENV: prod -# SHOPWARE_HTTP_CACHE_ENABLED: 0 -# SHOPWARE_DISABLE_UPDATE_CHECK: "true" -# PROJECT_ROOT: /var/www/html -# MYSQL_ROOT_PASSWORD: app -# DATABASE_URL: mysql://root:app@database:3306/root -# APP_URL: http://shopware.test:8000 -# APP_DEBUG: 1 -# before_script: -# - cd tests/acceptance -# - npm ci -# script: -# - npx playwright test --workers=1 -# after_script: -# - | -# echo "Link to HTML report" -# echo "-------------------------------------------------------------------------------------------------------------------------------------------------------" -# echo "https://shopware.pages.apps.shopware.io/-/6/services/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/tests/acceptance/playwright-report/index.html" -# echo "-------------------------------------------------------------------------------------------------------------------------------------------------------" -# artifacts: -# expire_in: 1 day -# when: always -# paths: -# - $CI_PROJECT_DIR/tests/acceptance/test-results/* -# - $CI_PROJECT_DIR/tests/acceptance/playwright-report/* diff --git a/.gitlab/Dockerfile b/.gitlab/Dockerfile deleted file mode 100644 index 0aa0f6207..000000000 --- a/.gitlab/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -#syntax=docker/dockerfile:1.4 - -ARG BASE_IMAGE -FROM ${BASE_IMAGE} as base-image - -FROM ghcr.io/friendsofshopware/shopware-cli:latest-php-8.2 as build -ARG CI_JOB_TOKEN - -COPY --from=base-image /var/www/html /src -WORKDIR /src - -COPY . /src/custom/plugins/SwagMigrationAssistant - -ENV COMPOSER_ALLOW_SUPERUSER=1 - -RUN /src/vendor/bin/composer -d /src/custom/plugins/SwagMigrationAssistant require --no-update 'shopware/core:*' \ - && /src/vendor/bin/composer require --no-plugins --no-scripts -o swag/migration-assistant \ - && rm -Rf /src/var/cache/* \ - && /usr/local/bin/entrypoint.sh shopware-cli project admin-build /src \ - && /usr/local/bin/entrypoint.sh shopware-cli project storefront-build --skip-theme-compile /src \ - && find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + \ - && find . -name '.git' -type d -prune -exec rm -rf '{}' + \ - && rm -Rf /src/public/bundles || true - -FROM base-image - -COPY --from=build --chown=www-data --link /src /var/www/html - -USER root -RUN apk add --no-cache mysql-client - -USER www-data - -ADD .gitlab/post_install_migration_assistant.sh /usr/local/shopware/post_install.d/99_post_install_migration_assistant.sh diff --git a/.gitlab/install_test_data.php b/.gitlab/install_test_data.php deleted file mode 100644 index 25eec317c..000000000 --- a/.gitlab/install_test_data.php +++ /dev/null @@ -1,55 +0,0 @@ -