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