mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Do not check dependents for PCOV and Xdebug
This commit is contained in:
parent
bb36513e49
commit
c8837583fc
@ -4,7 +4,7 @@ describe('Config tests', () => {
|
||||
it('checking addCoverage with PCOV on windows', async () => {
|
||||
let win32: string = await coverage.addCoverage('PCOV', '7.4', 'win32');
|
||||
expect(win32).toContain('Add-Extension pcov');
|
||||
expect(win32).toContain('Disable-Extension xdebug');
|
||||
expect(win32).toContain('Disable-Extension xdebug false');
|
||||
|
||||
win32 = await coverage.addCoverage('pcov', '7.0', 'win32');
|
||||
expect(win32).toContain('PHP 7.1 or newer is required');
|
||||
@ -16,13 +16,13 @@ describe('Config tests', () => {
|
||||
it('checking addCoverage with PCOV on linux', async () => {
|
||||
const linux: string = await coverage.addCoverage('pcov', '7.4', 'linux');
|
||||
expect(linux).toContain('add_extension pcov');
|
||||
expect(linux).toContain('disable_extension xdebug');
|
||||
expect(linux).toContain('disable_extension xdebug false');
|
||||
});
|
||||
|
||||
it('checking addCoverage with PCOV on darwin', async () => {
|
||||
const darwin: string = await coverage.addCoverage('pcov', '7.4', 'darwin');
|
||||
expect(darwin).toContain('add_brew_extension pcov');
|
||||
expect(darwin).toContain('disable_extension xdebug');
|
||||
expect(darwin).toContain('disable_extension xdebug false');
|
||||
});
|
||||
|
||||
it('checking addCoverage with Xdebug on windows', async () => {
|
||||
@ -84,20 +84,20 @@ describe('Config tests', () => {
|
||||
|
||||
it('checking disableCoverage windows', async () => {
|
||||
const win32 = await coverage.addCoverage('none', '7.4', 'win32');
|
||||
expect(win32).toContain('Disable-Extension xdebug');
|
||||
expect(win32).toContain('Disable-Extension pcov');
|
||||
expect(win32).toContain('Disable-Extension xdebug false');
|
||||
expect(win32).toContain('Disable-Extension pcov false');
|
||||
});
|
||||
|
||||
it('checking disableCoverage on linux', async () => {
|
||||
const linux: string = await coverage.addCoverage('none', '7.4', 'linux');
|
||||
expect(linux).toContain('disable_extension xdebug');
|
||||
expect(linux).toContain('disable_extension pcov');
|
||||
expect(linux).toContain('disable_extension xdebug false');
|
||||
expect(linux).toContain('disable_extension pcov false');
|
||||
});
|
||||
|
||||
it('checking disableCoverage on darwin', async () => {
|
||||
const darwin: string = await coverage.addCoverage('none', '7.4', 'darwin');
|
||||
expect(darwin).toContain('disable_extension xdebug');
|
||||
expect(darwin).toContain('disable_extension pcov');
|
||||
expect(darwin).toContain('disable_extension xdebug false');
|
||||
expect(darwin).toContain('disable_extension pcov false');
|
||||
});
|
||||
|
||||
it('checking no or invalid coverage driver', async () => {
|
||||
|
18
dist/index.js
vendored
18
dist/index.js
vendored
@ -111,7 +111,8 @@ const config = __importStar(__nccwpck_require__(88));
|
||||
async function addCoverageXdebug(extension, version, os_version, pipe) {
|
||||
let script = '\n';
|
||||
script +=
|
||||
(await extensions.addExtension(':pcov', version, os_version, true)) + pipe;
|
||||
(await extensions.addExtension(':pcov:false', version, os_version, true)) +
|
||||
pipe;
|
||||
script +=
|
||||
(await extensions.addExtension(extension, version, os_version, true)) +
|
||||
pipe;
|
||||
@ -124,8 +125,7 @@ async function addCoveragePCOV(version, os_version, pipe) {
|
||||
switch (true) {
|
||||
default:
|
||||
script +=
|
||||
(await extensions.addExtension(':xdebug', version, os_version, true)) +
|
||||
pipe;
|
||||
(await extensions.addExtension(':xdebug:false', version, os_version, true)) + pipe;
|
||||
script +=
|
||||
(await extensions.addExtension('pcov', version, os_version, true)) +
|
||||
pipe;
|
||||
@ -143,10 +143,10 @@ exports.addCoveragePCOV = addCoveragePCOV;
|
||||
async function disableCoverage(version, os_version, pipe) {
|
||||
let script = '\n';
|
||||
script +=
|
||||
(await extensions.addExtension(':pcov', version, os_version, true)) + pipe;
|
||||
script +=
|
||||
(await extensions.addExtension(':xdebug', version, os_version, true)) +
|
||||
(await extensions.addExtension(':pcov:false', version, os_version, true)) +
|
||||
pipe;
|
||||
script +=
|
||||
(await extensions.addExtension(':xdebug:false', version, os_version, true)) + pipe;
|
||||
script += await utils.addLog('$tick', 'none', 'Disabled Xdebug and PCOV', os_version);
|
||||
return script;
|
||||
}
|
||||
@ -210,7 +210,7 @@ async function addExtensionDarwin(extension_csv, version) {
|
||||
const ext_prefix = await utils.getExtensionPrefix(ext_name);
|
||||
switch (true) {
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\ndisable_extension ' + ext_name.slice(1);
|
||||
remove_script += '\ndisable_extension' + ext_name.replace(/:/g, ' ');
|
||||
return;
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
add_script += await utils.parseExtensionSource(extension, ext_prefix);
|
||||
@ -256,7 +256,7 @@ async function addExtensionWindows(extension_csv, version) {
|
||||
let matches;
|
||||
switch (true) {
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\nDisable-Extension ' + ext_name.slice(1);
|
||||
remove_script += '\nDisable-Extension' + ext_name.replace(/:/g, ' ');
|
||||
break;
|
||||
case /^(5\.[3-6]|7\.[0-4]|8\.0)blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
|
||||
case /^pdo_oci$|^oci8$|^pdo_firebird$/.test(extension):
|
||||
@ -313,7 +313,7 @@ async function addExtensionLinux(extension_csv, version) {
|
||||
const ext_prefix = await utils.getExtensionPrefix(ext_name);
|
||||
switch (true) {
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\ndisable_extension ' + ext_name.slice(1);
|
||||
remove_script += '\ndisable_extension' + ext_name.replace(/:/g, ' ');
|
||||
return;
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
add_script += await utils.parseExtensionSource(extension, ext_prefix);
|
||||
|
@ -18,7 +18,8 @@ export async function addCoverageXdebug(
|
||||
): Promise<string> {
|
||||
let script = '\n';
|
||||
script +=
|
||||
(await extensions.addExtension(':pcov', version, os_version, true)) + pipe;
|
||||
(await extensions.addExtension(':pcov:false', version, os_version, true)) +
|
||||
pipe;
|
||||
script +=
|
||||
(await extensions.addExtension(extension, version, os_version, true)) +
|
||||
pipe;
|
||||
@ -47,8 +48,12 @@ export async function addCoveragePCOV(
|
||||
switch (true) {
|
||||
default:
|
||||
script +=
|
||||
(await extensions.addExtension(':xdebug', version, os_version, true)) +
|
||||
pipe;
|
||||
(await extensions.addExtension(
|
||||
':xdebug:false',
|
||||
version,
|
||||
os_version,
|
||||
true
|
||||
)) + pipe;
|
||||
script +=
|
||||
(await extensions.addExtension('pcov', version, os_version, true)) +
|
||||
pipe;
|
||||
@ -92,10 +97,15 @@ export async function disableCoverage(
|
||||
): Promise<string> {
|
||||
let script = '\n';
|
||||
script +=
|
||||
(await extensions.addExtension(':pcov', version, os_version, true)) + pipe;
|
||||
script +=
|
||||
(await extensions.addExtension(':xdebug', version, os_version, true)) +
|
||||
(await extensions.addExtension(':pcov:false', version, os_version, true)) +
|
||||
pipe;
|
||||
script +=
|
||||
(await extensions.addExtension(
|
||||
':xdebug:false',
|
||||
version,
|
||||
os_version,
|
||||
true
|
||||
)) + pipe;
|
||||
script += await utils.addLog(
|
||||
'$tick',
|
||||
'none',
|
||||
|
@ -21,7 +21,7 @@ export async function addExtensionDarwin(
|
||||
switch (true) {
|
||||
// match :extension
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\ndisable_extension ' + ext_name.slice(1);
|
||||
remove_script += '\ndisable_extension' + ext_name.replace(/:/g, ' ');
|
||||
return;
|
||||
// match extensions for compiling from source
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
@ -115,7 +115,7 @@ export async function addExtensionWindows(
|
||||
switch (true) {
|
||||
// Match :extension
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\nDisable-Extension ' + ext_name.slice(1);
|
||||
remove_script += '\nDisable-Extension' + ext_name.replace(/:/g, ' ');
|
||||
break;
|
||||
// match 5.3blackfire...8.0blackfire
|
||||
// match 5.3blackfire-(semver)...8.0blackfire-(semver)
|
||||
@ -227,7 +227,7 @@ export async function addExtensionLinux(
|
||||
switch (true) {
|
||||
// Match :extension
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\ndisable_extension ' + ext_name.slice(1);
|
||||
remove_script += '\ndisable_extension' + ext_name.replace(/:/g, ' ');
|
||||
return;
|
||||
// match extensions for compiling from source
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
|
Loading…
Reference in New Issue
Block a user