Skip to content

Commit af0d8d0

Browse files
authored
Merge pull request #18 from magento-commerce/2.6.6-RC
MQE-2429: [GitHub Issue # 810] MFTF 2.x incompatibility with PHP XDebug
2 parents d388e4b + c3f910e commit af0d8d0

File tree

9 files changed

+262
-29
lines changed

9 files changed

+262
-29
lines changed

.github/workflows/main.yml

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Copyright © Magento, Inc. All rights reserved.
2+
# See COPYING.txt for license details.
3+
4+
name: CI
5+
6+
on: [pull_request]
7+
8+
jobs:
9+
unit-tests:
10+
name: Unit Tests
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php-versions: ['7.1', '7.2', '7.3']
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@master
21+
with:
22+
php-version: ${{ matrix.php-versions }}
23+
extensions: curl, dom, intl, json, openssl
24+
25+
- name: Cache Composer packages
26+
id: composer-cache
27+
uses: actions/cache@v2
28+
with:
29+
path: vendor
30+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-php-
33+
34+
- name: Install dependencies
35+
if: steps.composer-cache.outputs.cache-hit != 'true'
36+
run: composer install --prefer-dist --no-progress --no-suggest
37+
38+
- name: Run tests
39+
run: vendor/bin/phpunit --configuration dev/tests/phpunit.xml --testsuite unit --coverage-clover clover.xml
40+
41+
- name: Monitor coverage
42+
if: github.event_name == 'pull_request'
43+
uses: slavcodev/coverage-monitor-action@1.1.0
44+
with:
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
clover_file: "clover.xml"
47+
threshold_alert: 10
48+
threshold_warning: 20
49+
50+
verification-tests:
51+
name: Verification Tests
52+
runs-on: ubuntu-latest
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
php-versions: ['7.1', '7.2', '7.3']
57+
steps:
58+
- uses: actions/checkout@v2
59+
60+
- name: Setup PHP
61+
uses: shivammathur/setup-php@master
62+
with:
63+
php-version: ${{ matrix.php-versions }}
64+
extensions: curl, dom, intl, json, openssl
65+
66+
- name: Cache Composer packages
67+
id: composer-cache
68+
uses: actions/cache@v2
69+
with:
70+
path: vendor
71+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
72+
restore-keys: |
73+
${{ runner.os }}-php-
74+
75+
- name: Install dependencies
76+
if: steps.composer-cache.outputs.cache-hit != 'true'
77+
run: composer install --prefer-dist --no-progress --no-suggest
78+
79+
- name: Run tests
80+
run: vendor/bin/phpunit --configuration dev/tests/phpunit.xml --testsuite verification
81+
82+
static-tests:
83+
name: Static Tests
84+
runs-on: ubuntu-latest
85+
strategy:
86+
fail-fast: false
87+
matrix:
88+
php-versions: ['7.1', '7.2', '7.3']
89+
steps:
90+
- uses: actions/checkout@v2
91+
92+
- name: Setup PHP
93+
uses: shivammathur/setup-php@master
94+
with:
95+
php-version: ${{ matrix.php-versions }}
96+
extensions: curl, dom, intl, json, openssl
97+
coverage: none
98+
if: ${{ matrix.php-versions >= 7.2 }}
99+
100+
- name: Cache Composer packages
101+
id: composer-cache
102+
uses: actions/cache@v2
103+
with:
104+
path: vendor
105+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
106+
restore-keys: |
107+
${{ runner.os }}-php-
108+
109+
- name: Install dependencies
110+
if: steps.composer-cache.outputs.cache-hit != 'true'
111+
run: composer install --prefer-dist --no-progress --no-suggest
112+
113+
- name: Run tests
114+
run: bin/static-checks
115+
116+
functional-tests:
117+
name: Functional Tests
118+
runs-on: ubuntu-latest
119+
strategy:
120+
fail-fast: false
121+
matrix:
122+
php-versions: ['7.1', '7.2', '7.3']
123+
124+
services:
125+
chrome:
126+
image: selenium/standalone-chrome:3.141.59-zirconium
127+
ports:
128+
- 4444:4444
129+
steps:
130+
- uses: actions/checkout@v2
131+
132+
- name: Setup PHP
133+
uses: shivammathur/setup-php@master
134+
with:
135+
php-version: ${{ matrix.php-versions }}
136+
extensions: curl, dom, intl, json, openssl
137+
138+
- name: Cache Composer packages
139+
id: composer-cache
140+
uses: actions/cache@v2
141+
with:
142+
path: vendor
143+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
144+
restore-keys: |
145+
${{ runner.os }}-php-
146+
147+
- name: Install dependencies
148+
if: steps.composer-cache.outputs.cache-hit != 'true'
149+
run: composer install --prefer-dist --no-progress --no-suggest
150+
151+
- name: Run tests
152+
run: bin/functional

.travis.yml

-14
This file was deleted.

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
Magento Functional Testing Framework Changelog
22
================================================
3+
2.6.6
4+
---------
5+
6+
* Traceability
7+
* Removed `travis.yml` and replaced with `.github/workflows/main.yml`
8+
9+
### Fixes
10+
* 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)
11+
312
2.6.5
413
-----
14+
515
### GitHub Issues/Pull requests:
616
* [#547](https://github.com/magento/magento2-functional-testing-framework/pull/547) -- Fix invalid behavior of MAGENTO_BACKEND_BASE_URL
717

bin/functional

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright © Magento, Inc. All rights reserved.
2+
# See COPYING.txt for license details.
3+
4+
set -e
5+
6+
echo "==============================="
7+
echo " EXECUTE Functional Tests "
8+
echo "==============================="
9+
bin/mftf build:project
10+
bin/mftf run:test DeprecatedDevDocsTest -f
11+
bin/mftf run:test DevDocsTest -f

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "2.6.5",
5+
"version": "2.6.6",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {

composer.lock

+87-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/functional/standalone_bootstrap.php

-6
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,3 @@
6868
$RELATIVE_TESTS_MODULE_PATH = '/tests/functional/tests/MFTF';
6969
defined('TESTS_MODULE_PATH') || define('TESTS_MODULE_PATH', realpath(TESTS_BP . $RELATIVE_TESTS_MODULE_PATH));
7070

71-
72-
// add the debug flag here
73-
$debug_mode = $_ENV['MFTF_DEBUG'] ?? false;
74-
if (!(bool)$debug_mode && extension_loaded('xdebug')) {
75-
xdebug_disable();
76-
}

src/Magento/FunctionalTestingFramework/Config/MftfApplicationConfig.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function verboseEnabled()
194194
*/
195195
public function getDebugLevel()
196196
{
197-
return $this->debugLevel ?? getenv('MFTF_DEBUG');
197+
return $this->debugLevel;
198198
}
199199

200200
/**

0 commit comments

Comments
 (0)