Skip to content

MAGECLOUD-3967: Add static and unit tests to magento-cloud-components #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 7, 2019

Conversation

oshmyheliuk
Copy link
Contributor

@oshmyheliuk oshmyheliuk commented Sep 27, 2019

@oshmyheliuk oshmyheliuk added the Progress: review PR/issue status label Sep 30, 2019
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then composer config http-basic.repo.magento.com ${REPO_USERNAME} ${REPO_PASSWORD}; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then composer config github-oauth.github.com ${GITHUB_TOKEN}; fi;
- composer config repositories.magento composer https://repo.magento.com/
- composer require "magento/framework:*" --no-update
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail without keys, don't you want to add if statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok if it will fail, without "magento/framework:*" package test scripts won't run anyway.

"@phpunit"
],
"phpstan": "phpstan analyse -c Test/static/phpstan.neon",
"phpcs": "phpcs ./ --standard=Test/static/phpcs-ruleset.xml -p -n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add Sniffs from ECE-Tools

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

.travis.yml Outdated

env:
matrix:
- TEST_SUITE=static-unit XDEBUG=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yo don't need matrix, having only 1 variation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -21,8 +21,7 @@ class UrlFixer
*/
public function run(Store $store, $url): string
{
if (
($store->getForceDisableRewrites() || !$store->getConfig(Store::XML_PATH_USE_REWRITES))
if (($store->getForceDisableRewrites() || !$store->getConfig(Store::XML_PATH_USE_REWRITES))
&& strpos($url, '/magento/') !== false
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also create task to core to fix this issue

- composer update -n --no-suggest

script:
- if [ "$TEST_SUITE" == "static-unit" ]; then ./Test/static/static-travis.sh; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be in tests directory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why must? it will be strange to have Test and tests directories on one level.

@shiftedreality shiftedreality added Progress: approved PR/issue status and removed Progress: review PR/issue status labels Oct 7, 2019
@shiftedreality shiftedreality merged commit b2a5913 into develop Oct 7, 2019
@shiftedreality shiftedreality deleted the MAGECLOUD-3967 branch October 7, 2019 15:16
@YPyltiai YPyltiai added the Release: 1.0.2 MCC Release label Oct 28, 2019
magento-devops-reposync-svc pushed a commit that referenced this pull request Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: approved PR/issue status Release: 1.0.2 MCC Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants