Skip to content

Commit

Permalink
Merge pull request #746 from magento/develop-backport
Browse files Browse the repository at this point in the history
Backport develop branch
  • Loading branch information
shiftedreality authored Jun 17, 2020
2 parents 07c50d7 + ba77cab commit 87f2a43
Show file tree
Hide file tree
Showing 423 changed files with 18,065 additions and 7,608 deletions.
46 changes: 46 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
39 changes: 39 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contributing to Magento Cloud Tools code

Use the GitHub fork & pull model contribution model to submit your code contributions to the Magento Cloud Tools codebase.
In this contribution model, you maintain your own [fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks) of the ECE-Tools repository, and create a [pull request](https://help.github.com/articles/about-pull-requests/) to submit your proposed changes to the base repository. For details on the fork & pull contribution model, see the [Beginners guide](https://github.com/magento/magento2/wiki/Getting-Started).

Contributions can take the form of new features, changes to existing features, tests, bug fixes, or optimizations. You can also contribute new or updated documentation.

The Magento Cloud development team and community maintainers review all issues and contributions submitted by the developer community in first in, first out order (FIFO). During the review process, reviewers might notify a contributor to request clarification on the proposed changes.

## Prerequisites

You must have a [GitHub account](https://help.github.com/en/github/getting-started-with-github/signing-up-for-a-new-github-account) with [two-factor authentication](https://help.github.com/en/github/authenticating-to-github/configuring-two-factor-authentication) enabled to contribute to Magento repositories. We also recommend creating a [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) to use when interacting with GitHub from scripts or from the command line.

## Contribution requirements

1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.3/coding-standards/bk-coding-standards.html).
2. When you submit a Pull request (PR), write a meaningful description to explain the purpose of your contribution. Comprehensive descriptions increase the chances that a pull request can be merged quickly, without requests for additional clarification. See the [Magento Cloud Tools Pull Request Template](https://github.com/magento/ece-tools/blob/develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
3. Commits must be accompanied by meaningful commit messages.
4. If your PR includes bug fixes, provide a step-by-step description of how to reproduce the bug in the pull request description.
3. If your PR includes new logic or new features, you must also submit the following information along with the pull request
* Unit/integration test coverage
* Proposed documentation updates: Submit developer documentation contributions to the [Magento DevDocs repository](https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md). Submit updates to Magento user documentation to the [Magento Merchant documentation repository](https://github.com/magento/merchdocs/blob/master/.github/CONTRIBUTING.md).
4. For larger features or changes, [open an issue](https://github.com/magento/ece-tools/issues/new) to discuss the proposed changes prior to development. Discussing the updates in advance can prevent duplicate or unnecessary effort and allow other contributors to provide input.

## Contribution process
1. Search current [listed issues](https://github.com/magento/ece-tools/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
2. Review and sign the [Contributor License Agreement (CLA)](https://opensource.adobe.com/cla.html) if this is your first time contributing. You only need to sign the CLA once.
3. Create and test your work.
4. Fork the ECE-Tools repository according to the [Fork A Repository instructions](https://github.com/magento/magento2/wiki/Forking-and-Branching) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://github.com/magento/magento2/wiki/Working-Issues-and-PRs#submitting-prs).
5. After you submit the pull request, the Magento Cloud development team will review the contribution and collaborate with you as needed to incorporate your proposed changes.

## Code of Conduct

This project is released with a Contributor Code of Conduct. We expect you to agree to its terms when participating in this project.
The full text is available in the repository [Wiki](https://github.com/magento/magento2/wiki/Magento-Code-of-Conduct).

## Connecting with Community!

Need to find a project? Check out the [Slack Channels](https://github.com/magento/magento2/wiki/Slack-Channels) (with listed project info) and the [Magento Community Portal](https://opensource.magento.com/).
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
name: Bug report
about: Technical issue with the Magento ECE-Tools
title: ''
labels: ''
assignees: ''
---

<!---
Thank you for contributing to Magento.
To help us process this issue we recommend that you add the following information:
Expand Down
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<!---
Please provide a description of the changes proposed in the pull request.
Letting us know what has changed and why it needed changing will help us validate this pull request.
If this PR was initiated by an internal JIRA ticket, copy the description from the ticket here so that the information is visible to contributors from the Magento Cloud Community.
-->

### Fixed Issues (if relevant)
Expand All @@ -30,8 +32,19 @@
1. ...
2. ...

### Release notes

For user-facing changes, add a meaningful release note. For examples, see [Magento Cloud ECE-tools release notes](https://devdocs.magento.com/cloud/release-notes/ece-release-notes.html).

### Associated documentation updates
<!--
If your proposed update requires user documentation, submit a PR to the Magento DevDocs repository. For extensive updates requiring assistance, submit an issue to DevDocs. See https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md.
-->
Add link to Magento DevDocs PR or Issue, if needed.

### Contribution checklist
- [ ] Pull request has a meaningful description of its purpose
- [ ] Pull request introduces user-facing changes and includes meaningful updates for any required release notes and documentation changes
- [ ] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] All automated tests passed successfully (all builds on Travis CI are green)
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI
on: [pull_request]

jobs:
static-unit:
name: Acceptance Tests
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.1', '7.2', '7.3']
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Prepare PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: sockets
- name: Remove secure repositories
run: |
composer config --unset repositories.repo.magento.com
composer remove --no-update magento/magento-cloud-components
composer remove --no-update magento/magento-cloud-docker
composer remove --no-update magento/magento-cloud-patches
- name: Composer Update
run: composer update
- name: Static and Unit tests
run: |
./vendor/bin/phpstan analyse -c ./tests/static/phpstan.neon
./vendor/bin/phpcs ./src --standard=./tests/static/phpcs-ruleset.xml -p -n
./vendor/bin/phpmd ./src xml ./tests/static/phpmd-ruleset.xml
./vendor/bin/phpunit --configuration ./tests/unit --coverage-clover ./tests/unit/tmp/clover.xml && php ./tests/unit/code-coverage.php ./tests/unit/tmp/clover.xml
./vendor/bin/phpunit --configuration ./tests/unit
- name: Integration tests
run: ./vendor/bin/phpunit --configuration ./tests/integration

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/docker-compose.yml
/auth.json
/codeception.yml
/_workdir
57 changes: 12 additions & 45 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: xenial
dist: bionic

addons:
hosts:
Expand All @@ -17,51 +17,19 @@ php:
- '7.3'

env:
matrix:
- TEST_SUITE=functional-ce
- TEST_SUITE=functional-ee
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=1
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=2
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=3
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=4
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=5
- TEST_SUITE=functional-ce
- TEST_SUITE=functional-ee
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=1
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=2
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=3
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=4
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=5
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=6

stages:
- static-unit
- integration
- test

jobs:
include:
- stage: static-unit
script: ./tests/travis/static-unit.sh
env:
- TEST_SUITE=static-unit
- XDEBUG=true
- script: ./tests/travis/static-unit.sh
php: '7.2'
env:
- TEST_SUITE=static-unit
- XDEBUG=true
- script: ./tests/travis/static-unit.sh
php: '7.3'
env:
- TEST_SUITE=static-unit
- XDEBUG=true
- stage: integration
script: ./tests/travis/integration.sh;
env:
- TEST_SUITE=integration
- script: ./tests/travis/integration.sh;
php: '7.2'
env:
- TEST_SUITE=integration
- script: ./tests/travis/integration.sh;
php: '7.3'
env:
- TEST_SUITE=integration

matrix:
exclude:
- php: '7.1'
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=1
Expand All @@ -73,6 +41,8 @@ matrix:
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=4
- php: '7.1'
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=5
- php: '7.1'
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=6

- php: '7.2'
env: TEST_SUITE=functional-ee
Expand All @@ -89,10 +59,7 @@ install:
- composer update -n --no-suggest

before_script:
- if [ $TEST_SUITE == "functional-ce" ]; then echo "COMPOSER_MAGENTO_USERNAME=${REPO_USERNAME_CE}" >> ./.docker/composer.env && echo "COMPOSER_MAGENTO_PASSWORD=${REPO_PASSWORD_CE}" >> ./.docker/composer.env; fi;
- if [ $TEST_SUITE == "functional-ee" ]; then echo "COMPOSER_MAGENTO_USERNAME=${REPO_USERNAME}" >> ./.docker/composer.env && echo "COMPOSER_MAGENTO_PASSWORD=${REPO_PASSWORD}" >> ./.docker/composer.env; fi;
- echo "COMPOSER_GITHUB_TOKEN=${GITHUB_TOKEN}" >> ./.docker/composer.env
- if [ $XDEBUG == "true" ]; then echo "PHP_ENABLE_XDEBUG=true" >> ./.docker/global.env; fi;
- if [ $TEST_SUITE == "functional-ce" ]; then cp codeception.dist.yml codeception.yml && sed -i "s/REPO_USERNAME/REPO_USERNAME_CE/" codeception.yml && sed -i "s/REPO_PASSWORD/REPO_PASSWORD_CE/" codeception.yml; fi;

script:
- if [ $TEST_SUITE == "functional-ce" ]; then ./tests/travis/functional_ce.sh; fi;
Expand Down
34 changes: 17 additions & 17 deletions codeception.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ paths:
tests: src/Test/Functional
output: tests/functional/_output
data: tests/functional/_data
support: tests/functional/_support
envs: tests/functional/_envs
support: vendor/magento/magento-cloud-docker/tests/functional/_support
actor_suffix: Tester
settings:
colors: true
extensions:
enabled:
- Codeception\Extension\RunFailed
- Codeception\Extension\FailedInfo
params:
- tests/functional/configuration.dist.yml
- vendor/magento/magento-cloud-docker/tests/functional/configuration.dist.yml
- env
modules:
config:
Magento\MagentoCloud\Test\Functional\Codeception\Docker:
db_host: "%Magento.docker.settings.db.host%"
db_port: "%Magento.docker.settings.db.port%"
db_username: "%Magento.docker.settings.db.username%"
db_password: "%Magento.docker.settings.db.password%"
db_path: "%Magento.docker.settings.db.path%"
repo_url: "%Magento.docker.settings.repo.url%"
repo_branch: "%Magento.docker.settings.repo.branch%"
system_ece_tools_dir: "%Magento.docker.settings.system.ece_dir%"
Magento\CloudDocker\Test\Functional\Codeception\TestInfrastructure:
template_repo: "https://github.com/magento/magento-cloud.git"
mcd_repo: "https://github.com/magento/magento-cloud-docker.git"
mcc_repo: "https://github.com/magento/magento-cloud-components.git"
mcp_repo: "https://github.com/magento/magento-cloud-patches.git"
composer_magento_username: "%REPO_USERNAME%"
composer_magento_password: "%REPO_PASSWORD%"
composer_github_token: "%GITHUB_TOKEN%"
printOutput: false
Magento\CloudDocker\Test\Functional\Codeception\Docker:
system_magento_dir: "%Magento.docker.settings.system.magento_dir%"
env_base_url: "%Magento.docker.settings.env.url.base%"
env_secure_base_url: "%Magento.docker.settings.env.url.secure_base%"
volumes: []
printOutput: false
PhpBrowser:
url: "%Magento.docker.settings.env.url.base%"
Magento\MagentoCloud\Test\Functional\Codeception\MagentoDb:
dsn: "mysql:host=127.0.0.1;port=3306;dbname=%Magento.docker.settings.db.path%"
Magento\CloudDocker\Test\Functional\Codeception\MagentoDb:
dsn: "mysql:host=%Magento.docker.settings.db.host%;port=%Magento.docker.settings.db.port%;dbname=%Magento.docker.settings.db.path%"
user: "%Magento.docker.settings.db.username%"
password: "%Magento.docker.settings.db.password%"
exposed_port: "%Magento.docker.settings.db.port%"
reconnect: true
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"ext-PDO": "*",
"ext-json": "*",
"ext-sockets": "*",
"colinmollenhour/credis": "^1.6.0",
"composer/composer": "^1.4",
"composer/semver": "^1.4",
"graylog2/gelf-php": "^1.4.2",
Expand All @@ -31,7 +32,7 @@
"symfony/console": "^2.8||^4.0",
"symfony/dependency-injection": "^3.3||^4.3",
"symfony/process": "^2.1||^4.1",
"symfony/serializer": "^2.8||^3.3",
"symfony/serializer": "^2.8||^3.3||^4.0",
"symfony/yaml": "^3.3||^4.0"
},
"require-dev": {
Expand Down Expand Up @@ -72,13 +73,15 @@
"@test:phpstan",
"@test:phpcs",
"@test:phpmd",
"@test:phpunit",
"@test:unit",
"@test:integration",
"@test:coverage"
],
"test:phpstan": "phpstan analyse -c tests/static/phpstan.neon",
"test:phpcs": "phpcs src --standard=tests/static/phpcs-ruleset.xml -p -n",
"test:phpmd": "phpmd src xml tests/static/phpmd-ruleset.xml",
"test:phpunit": "phpunit --configuration tests/unit",
"test:unit": "phpunit --configuration tests/unit",
"test:integration": "phpunit --configuration tests/integration",
"test:coverage": "phpunit --configuration tests/unit --coverage-clover tests/unit/tmp/clover.xml && php tests/unit/code-coverage.php tests/unit/tmp/clover.xml",
"test:coverage-generate": "phpunit --configuration tests/unit --coverage-html tests/unit/tmp/coverage",
"pre-autoload-dump": [
Expand Down
Loading

0 comments on commit 87f2a43

Please sign in to comment.