Skip to content

Commit

Permalink
Merge pull request #18 from magento-commerce/2.6.6-RC
Browse files Browse the repository at this point in the history
MQE-2429: [GitHub Issue # 810] MFTF 2.x incompatibility with PHP XDebug
  • Loading branch information
soumyau authored Dec 21, 2020
2 parents d388e4b + c3f910e commit af0d8d0
Show file tree
Hide file tree
Showing 9 changed files with 262 additions and 29 deletions.
152 changes: 152 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Copyright © Magento, Inc. All rights reserved.
# See COPYING.txt for license details.

name: CI

on: [pull_request]

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.1', '7.2', '7.3']
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: curl, dom, intl, json, openssl

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run tests
run: vendor/bin/phpunit --configuration dev/tests/phpunit.xml --testsuite unit --coverage-clover clover.xml

- name: Monitor coverage
if: github.event_name == 'pull_request'
uses: slavcodev/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clover_file: "clover.xml"
threshold_alert: 10
threshold_warning: 20

verification-tests:
name: Verification Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.1', '7.2', '7.3']
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: curl, dom, intl, json, openssl

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run tests
run: vendor/bin/phpunit --configuration dev/tests/phpunit.xml --testsuite verification

static-tests:
name: Static Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.1', '7.2', '7.3']
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: curl, dom, intl, json, openssl
coverage: none
if: ${{ matrix.php-versions >= 7.2 }}

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run tests
run: bin/static-checks

functional-tests:
name: Functional Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.1', '7.2', '7.3']

services:
chrome:
image: selenium/standalone-chrome:3.141.59-zirconium
ports:
- 4444:4444
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: curl, dom, intl, json, openssl

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run tests
run: bin/functional
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
Magento Functional Testing Framework Changelog
================================================
2.6.6
---------

* Traceability
* Removed `travis.yml` and replaced with `.github/workflows/main.yml`

### Fixes
* Fixed issue that causes Magento bin/magento to fail when xdebug 3 is used. [GitHub Issue #808](https://github.com/magento/magento2-functional-testing-framework/issues/808)

2.6.5
-----

### GitHub Issues/Pull requests:
* [#547](https://github.com/magento/magento2-functional-testing-framework/pull/547) -- Fix invalid behavior of MAGENTO_BACKEND_BASE_URL

Expand Down
11 changes: 11 additions & 0 deletions bin/functional
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright © Magento, Inc. All rights reserved.
# See COPYING.txt for license details.

set -e

echo "==============================="
echo " EXECUTE Functional Tests "
echo "==============================="
bin/mftf build:project
bin/mftf run:test DeprecatedDevDocsTest -f
bin/mftf run:test DevDocsTest -f
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento/magento2-functional-testing-framework",
"description": "Magento2 Functional Testing Framework",
"type": "library",
"version": "2.6.5",
"version": "2.6.6",
"license": "AGPL-3.0",
"keywords": ["magento", "automation", "functional", "testing"],
"config": {
Expand Down
88 changes: 87 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions dev/tests/functional/standalone_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,3 @@
$RELATIVE_TESTS_MODULE_PATH = '/tests/functional/tests/MFTF';
defined('TESTS_MODULE_PATH') || define('TESTS_MODULE_PATH', realpath(TESTS_BP . $RELATIVE_TESTS_MODULE_PATH));


// add the debug flag here
$debug_mode = $_ENV['MFTF_DEBUG'] ?? false;
if (!(bool)$debug_mode && extension_loaded('xdebug')) {
xdebug_disable();
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function verboseEnabled()
*/
public function getDebugLevel()
{
return $this->debugLevel ?? getenv('MFTF_DEBUG');
return $this->debugLevel;
}

/**
Expand Down
Loading

0 comments on commit af0d8d0

Please sign in to comment.