2 Star 5 Fork 1

Haiwera / magento2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.travis.yml 3.56 KB
一键复制 编辑 原始数据 按行查看 历史
sudo: required
dist: trusty
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- postfix
language: php
php:
- 5.5
- 5.6
env:
- TEST_SUITE=unit
- TEST_SUITE=integration_part_1
- TEST_SUITE=integration_part_2
- TEST_SUITE=integration_integrity
- TEST_SUITE=static_phpcs
- TEST_SUITE=static_annotation
cache:
apt: true
directories:
- $HOME/.composer/cache
- $HOME/.cache/bin
matrix:
exclude:
- php: 5.6
env: TEST_SUITE=static_phpcs
- php: 5.6
env: TEST_SUITE=static_annotation
before_install:
# Workaround for the MongoDB GPG key expiry
- sudo rm /etc/apt/sources.list.d/mongodb-3.4.list
- sudo apt-get update -qq
- sudo apt-get install -y -qq postfix
- sh -c 'if [ "$CASHER_DIR" ]; then
if [ -x $HOME/.cache/bin/composer ]; then
$HOME/.cache/bin/composer self-update; echo '';
else
mkdir -p $HOME/.cache/bin;
curl --connect-timeout 30 -sS https://getcomposer.org/installer
| php -- --install-dir $HOME/.cache/bin/ --filename composer;
fi
fi'
- export PATH="$HOME/.cache/bin:$PATH"
before_script:
# Mock mail
- sudo service postfix stop
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
- echo -e '#!/usr/bin/env bash\nexit 0' | sudo tee /usr/sbin/sendmail
- >
echo 'sendmail_path = "/usr/sbin/sendmail -t -i "'
| sudo tee "/home/travis/.phpenv/versions/`php -i
| grep "PHP Version"
| head -n 1
| grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini"
# Disable xDebug
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# Install MySQL 5.6, create DB for integration tests
- >
sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ] || [ '$TEST_SUITE' = 'integration_part_2' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then
mysql -u root -e 'SET @@global.sql_mode = NO_ENGINE_SUBSTITUTION; CREATE DATABASE magento_integration_tests;';
mv dev/tests/integration/etc/install-config-mysql.travis.php.dist dev/tests/integration/etc/install-config-mysql.php;
fi"
# Change memory_limit for travis
- echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv rehash;
- composer install --no-interaction --prefer-dist
script:
# Unit tests
- sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi"
# Integration tests
- sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ] || [ '$TEST_SUITE' = 'integration_part_2' ]; then cd dev/tests/integration/; bash IntegationTestsForTravis.sh 2; fi"
- sh -c "if [ '$TEST_SUITE' = 'integration_part_1' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.travis1; fi"
- sh -c "if [ '$TEST_SUITE' = 'integration_part_2' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.travis2; fi"
# Integration integrity tests
- sh -c "if [ '$TEST_SUITE' = 'integration_integrity' ]; then cd dev/tests/integration/; ./../../../vendor/bin/phpunit -c phpunit.xml.dist testsuite/Magento/Test/Integrity; fi"
# Static tests [Code Style]
- sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testCodeStyle'; fi"
# Static tests [Code Style]
- sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"
PHP
1
https://gitee.com/Haiwera/magento2.git
git@gitee.com:Haiwera/magento2.git
Haiwera
magento2
magento2
2.0

搜索帮助