Skip to content
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

WIP: Travis and MFT #1

Open
wants to merge 18 commits into
base: 1.9.4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
dist: trusty
group: edge
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- postfix
firefox: "46.0"
hosts:
- magento.travis
language: php

php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

env:
global:
- COMPOSER_BIN_DIR=~/bin
- MAGENTO_HOST_NAME="magento.travis"
matrix:
- TEST_SUITE=static
- TEST_SUITE=functional
matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: 7.3
- php: 7.4

cache:
apt: true
directories:
- $HOME/.composer/cache
before_install: ./dev/travis/before_install.sh
install: if [ $TEST_SUITE == "functional" ]; then composer install --no-interaction; fi
before_script: ./dev/travis/before_script.sh
script:
- '! find . -not \( -path ./.phpstorm.meta.php -prune \) -not \( -path ./lib/PEAR -prune \) -not \( -path ./lib/phpseclib -prune \) -not \( -path ./lib/Zend -prune \) -type f -name "*.php" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"'
- '! find app/design -type f -name "*.phtml" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"'
- if [ $TEST_SUITE == "static" ]; then ! find . -not \( -path ./.phpstorm.meta.php -prune \) -not \( -path ./lib/PEAR -prune \) -not \( -path ./lib/phpseclib -prune \) -not \( -path ./lib/Zend -prune \) -type f -name "*.php" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"; fi
- if [ $TEST_SUITE == "static" ]; then ! find app/design -type f -name "*.phtml" -exec php -d error_reporting=32767 -l {} \; 2>&1 >&- | grep "^"; fi
- if [ $TEST_SUITE == "functional" ]; then travis_wait 30 dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE; fi
2 changes: 2 additions & 0 deletions dev/tests/functional/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor
generated
32 changes: 32 additions & 0 deletions dev/tests/functional/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Magento Functional Tests

This suite of tests is based on the abandoned magento/mtf project.

## Install

First, install dependencies using composer:

```sh
docker run --rm -it \
--volume $PWD:/app --volume ${COMPOSER_HOME:-$HOME/.composer}:/tmp \
--user $(id -u):$(id -g) \
composer --ignore-platform-reqs install
```

Then generate tests using PHP:

```sh
docker run --rm -it \
--volume $(realpath $PWD/../../../):/app --workdir /app \
php:7.2 \
php -f dev/tests/functional/utils/generate.php
```

Run tests:

```sh
docker run --rm -it \
--volume $(realpath $PWD/../../../):/app --workdir /app \
php:7.2 \
dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/functional
```
11 changes: 6 additions & 5 deletions dev/tests/functional/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
}
],
"require": {
"magento/mtf": "1.0.0-rc41",
"php": ">=5.4.0",
"phpunit/phpunit": "4.1.0",
"phpunit/phpunit-selenium": ">=1.2",
"netwing/selenium-server-standalone": ">=2.35"
"magento/mtf": "1.0.0-rc64",
"php": "~7.1.0||~7.2.0||~7.3.0",
"phpunit/phpunit": "~6.5.0",
"phpunit/phpunit-selenium": "~4.1.0",
"php-webdriver/webdriver": "~1.8.2",
"se/selenium-server-standalone": "2.53.1"
},
"autoload": {
"psr-4": {
Expand Down
Loading