This repository has been archived by the owner on Jun 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from pmclain/develop
v1.1.0
- Loading branch information
Showing
95 changed files
with
777 additions
and
1,101 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
sudo: required | ||
dist: trusty | ||
group: edge | ||
addons: | ||
apt: | ||
packages: | ||
- mysql-server-5.6 | ||
- mysql-client-core-5.6 | ||
- mysql-client-5.6 | ||
- postfix | ||
hosts: | ||
- magento2.travis | ||
language: php | ||
php: | ||
- 7.1 | ||
env: | ||
global: | ||
- COMPOSER_BIN_DIR=~/bin | ||
matrix: | ||
- TEST_SUITE=unit | ||
cache: | ||
apt: true | ||
directories: | ||
- $HOME/.composer/cache | ||
before_script: ./.travis/before_script.sh | ||
script: phpunit -c magento2/dev/tests/$TEST_SUITE |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
trap '>&2 echo Error: Command \`$BASH_COMMAND\` on line $LINENO failed with exit code $?' ERR | ||
|
||
# mock mail | ||
sudo service postfix stop | ||
echo # print a newline | ||
smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 & | ||
echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/sendmail.ini | ||
|
||
# disable xdebug and adjust memory limit | ||
echo > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini | ||
echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
phpenv rehash; | ||
|
||
composer selfupdate | ||
|
||
# clone main magento github repository | ||
git clone --branch 2.2.2 --depth=1 https://github.com/magento/magento2 | ||
|
||
# install Magento | ||
cd magento2 | ||
|
||
# add composer package under test, composer require will trigger update/install | ||
composer config minimum-stability dev | ||
composer config repositories.travis_to_test git https://github.com/pmclain/module-stripe.git | ||
composer require pmclain/module-stripe:dev-master#$TRAVIS_COMMIT | ||
|
||
# prepare for test suite | ||
case $TEST_SUITE in | ||
integration) | ||
cp vendor/pmclain/module-stripe/Test/Integration/phpunit.xml.dist dev/tests/integration/phpunit.xml | ||
|
||
cd dev/tests/integration | ||
|
||
# create database and move db config into place | ||
mysql -uroot -e ' | ||
SET @@global.sql_mode = NO_ENGINE_SUBSTITUTION; | ||
CREATE DATABASE magento_integration_tests; | ||
' | ||
mv etc/install-config-mysql.travis.php.dist etc/install-config-mysql.php | ||
|
||
cd ../../.. | ||
;; | ||
static) | ||
cd dev/tests/static | ||
|
||
echo "==> preparing changed files list" | ||
changed_files_ce="$TRAVIS_BUILD_DIR/dev/tests/static/testsuite/Magento/Test/_files/changed_files_ce.txt" | ||
php get_github_changes.php \ | ||
--output-file="$changed_files_ce" \ | ||
--base-path="$TRAVIS_BUILD_DIR" \ | ||
--repo='https://github.com/magento/magento2.git' \ | ||
--branch="$TRAVIS_BRANCH" | ||
cat "$changed_files_ce" | sed 's/^/ + including /' | ||
|
||
cd ../../.. | ||
;; | ||
unit) | ||
cp vendor/pmclain/module-stripe/Test/Unit/phpunit.xml.dist dev/tests/unit/phpunit.xml | ||
;; | ||
esac |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.