Merge pull request #64 from shivammathur/develop

Speed improvements and fixes for shell change in windows
This commit is contained in:
Shivam Mathur 2019-10-25 05:11:14 +05:30 committed by GitHub
commit 16267e1982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 138 additions and 80 deletions

View File

@ -30,7 +30,6 @@ jobs:
- name: Send Coverage
continue-on-error: true
timeout-minutes: 2
shell: pwsh
run: curl -s https://codecov.io/bash | bash -s -- -t ${{secrets.CODECOV_TOKEN}} -f coverage/clover.xml -n github-actions-codecov-${{ matrix.operating-system }}-php${{ matrix.php-versions }}
- name: Setup PHP with extensions and custom config
@ -48,6 +47,6 @@ jobs:
run: php -m
- name: Testing ini values
run: |
php -r "echo \"post_max_size: \" . ini_get('post_max_size') . \"\n\";"
php -r "echo \"short_open_tag: \" . ini_get('short_open_tag') . \"\n\";"
php -r "echo \"date.timezone: \" . ini_get('date.timezone') . \"\n\";"
printf "post_max_size: %s\n" $(php -r "echo ini_get('post_max_size');")
printf "short_open_tag: %s\n" $(php -r "echo ini_get('short_open_tag');")
printf "date.timezone: %s\n" $(php -r "echo ini_get('date.timezone');")

View File

@ -40,10 +40,10 @@ describe('Extension tests', () => {
'linux'
);
expect(linux).toContain(
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php7.2-xdebug'
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.2-xdebug'
);
expect(linux).toContain(
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php7.2-pcov'
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.2-pcov'
);
linux = await extensions.addExtension('xdebug, pcov', '7.4', 'linux');

View File

@ -22,4 +22,3 @@ jobs:
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
shell: pwsh

View File

@ -30,4 +30,3 @@ jobs:
run: php artisan config:clear
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
shell: pwsh

View File

@ -26,4 +26,3 @@ jobs:
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
shell: pwsh

View File

@ -22,4 +22,3 @@ jobs:
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
shell: pwsh

View File

@ -24,4 +24,3 @@ jobs:
composer require --dev phpunit/phpunit squizlabs/php_codesniffer zendframework/zend-test
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
shell: pwsh

View File

@ -172,7 +172,7 @@ function addExtensionLinux(extension_csv, version) {
break;
default:
install_command =
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php' +
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php' +
version +
'-' +
extension +

View File

@ -63,7 +63,7 @@ function run() {
}
else if (os_version == 'win32') {
yield build('win32.ps1', version, os_version);
yield exec_1.exec('powershell .\\' + version + 'win32.ps1 -version ' + version);
yield exec_1.exec('pwsh .\\' + version + 'win32.ps1 -version ' + version);
}
else if (os_version == 'linux') {
yield build('linux.sh', version, os_version);

33
node_modules/@actions/core/README.md generated vendored
View File

@ -105,3 +105,36 @@ const result = await core.group('Do something async', async () => {
return response
})
```
#### Action state
You can use this library to save state and get state for sharing information between a given wrapper action:
**action.yml**
```yaml
name: 'Wrapper action sample'
inputs:
name:
default: 'GitHub'
runs:
using: 'node12'
main: 'main.js'
post: 'cleanup.js'
```
In action's `main.js`:
```js
const core = require('@actions/core');
core.saveState("pidToKill", 12345);
```
In action's `cleanup.js`:
```js
const core = require('@actions/core');
var pid = core.getState("pidToKill");
process.kill(pid);
```

View File

@ -96,3 +96,17 @@ export declare function endGroup(): void;
* @param fn The function to wrap in the group
*/
export declare function group<T>(name: string, fn: () => Promise<T>): Promise<T>;
/**
* Saves state for current action, the state can only be retrieved by this action's post job execution.
*
* @param name name of the state to store
* @param value value to store
*/
export declare function saveState(name: string, value: string): void;
/**
* Gets the value of an state set by this action's main execution.
*
* @param name name of the state to get
* @returns string
*/
export declare function getState(name: string): string;

View File

@ -169,4 +169,27 @@ function group(name, fn) {
});
}
exports.group = group;
//-----------------------------------------------------------------------
// Wrapper action state
//-----------------------------------------------------------------------
/**
* Saves state for current action, the state can only be retrieved by this action's post job execution.
*
* @param name name of the state to store
* @param value value to store
*/
function saveState(name, value) {
command_1.issueCommand('save-state', { name }, value);
}
exports.saveState = saveState;
/**
* Gets the value of an state set by this action's main execution.
*
* @param name name of the state to get
* @returns string
*/
function getState(name) {
return process.env[`STATE_${name}`] || '';
}
exports.getState = getState;
//# sourceMappingURL=core.js.map

View File

@ -1 +1 @@
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAA6C;AAE7C,yBAAwB;AACxB,6BAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI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,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"}

View File

@ -1,33 +1,33 @@
{
"_args": [
[
"@actions/core@1.1.3",
"@actions/core@1.2.0",
"E:\\python\\setup-php"
]
],
"_from": "@actions/core@1.1.3",
"_id": "@actions/core@1.1.3",
"_from": "@actions/core@1.2.0",
"_id": "@actions/core@1.2.0",
"_inBundle": false,
"_integrity": "sha512-2BIib53Jh4Cfm+1XNuZYYGTeRo8yiWEAUMoliMh1qQGMaqTF4VUlhhcsBylTu4qWmUx45DrY0y0XskimAHSqhw==",
"_integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw==",
"_location": "/@actions/core",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/core@1.1.3",
"raw": "@actions/core@1.2.0",
"name": "@actions/core",
"escapedName": "@actions%2fcore",
"scope": "@actions",
"rawSpec": "1.1.3",
"rawSpec": "1.2.0",
"saveSpec": null,
"fetchSpec": "1.1.3"
"fetchSpec": "1.2.0"
},
"_requiredBy": [
"/",
"/@actions/tool-cache"
],
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.1.3.tgz",
"_spec": "1.1.3",
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz",
"_spec": "1.2.0",
"_where": "E:\\python\\setup-php",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
@ -64,5 +64,5 @@
"test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc"
},
"version": "1.1.3"
"version": "1.2.0"
}

70
package-lock.json generated
View File

@ -1,13 +1,13 @@
{
"name": "setup-php",
"version": "1.4.3",
"version": "1.4.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@actions/core": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.1.3.tgz",
"integrity": "sha512-2BIib53Jh4Cfm+1XNuZYYGTeRo8yiWEAUMoliMh1qQGMaqTF4VUlhhcsBylTu4qWmUx45DrY0y0XskimAHSqhw=="
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz",
"integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw=="
},
"@actions/exec": {
"version": "1.0.1",
@ -540,9 +540,9 @@
"dev": true
},
"@types/node": {
"version": "12.11.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.11.1.tgz",
"integrity": "sha512-TJtwsqZ39pqcljJpajeoofYRfeZ7/I/OMUQ5pR4q5wOKf2ocrUvBAZUMhWsOvKx3dVc/aaV5GluBivt0sWqA5A==",
"version": "12.11.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.11.7.tgz",
"integrity": "sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==",
"dev": true
},
"@types/normalize-package-data": {
@ -943,9 +943,9 @@
}
},
"bser": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/bser/-/bser-2.1.0.tgz",
"integrity": "sha512-8zsjWrQkkBoLK6uxASk1nJ2SKv97ltiGDo6A3wA0/yRPz+CwmEyDo0hUrhIuukG2JHpAl3bvFIixw2/3Hi0DOg==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
"integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==",
"dev": true,
"requires": {
"node-int64": "^0.4.0"
@ -1111,9 +1111,9 @@
}
},
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true,
"optional": true
},
@ -1219,9 +1219,9 @@
},
"dependencies": {
"whatwg-url": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz",
"integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz",
"integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==",
"dev": true,
"requires": {
"lodash.sortby": "^4.7.0",
@ -1370,9 +1370,9 @@
}
},
"es-abstract": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.15.0.tgz",
"integrity": "sha512-bhkEqWJ2t2lMeaJDuk7okMkJWI/yqgH/EoGwpcvv0XW9RWQsRspI4wt6xuyuvMvvQE3gg/D9HXppgk21w78GyQ==",
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz",
"integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.0",
@ -2310,9 +2310,9 @@
}
},
"glob": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"version": "7.1.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz",
"integrity": "sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@ -2330,9 +2330,9 @@
"dev": true
},
"graceful-fs": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz",
"integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
"dev": true
},
"growly": {
@ -2342,9 +2342,9 @@
"dev": true
},
"handlebars": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.3.tgz",
"integrity": "sha512-B0W4A2U1ww3q7VVthTKfh+epHx+q4mCt6iK+zEAzbMBpWQAwxCeKxEGpj/1oQTpzPXDNSOG7hmG14TsISH50yw==",
"version": "4.4.5",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.5.tgz",
"integrity": "sha512-0Ce31oWVB7YidkaTq33ZxEbN+UDxMMgThvCe8ptgQViymL5DPis9uLdTA13MiRPhgvqyxIegugrP97iK3JeBHg==",
"dev": true,
"requires": {
"neo-async": "^2.6.0",
@ -4150,9 +4150,9 @@
"dev": true
},
"react-is": {
"version": "16.10.2",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.10.2.tgz",
"integrity": "sha512-INBT1QEgtcCCgvccr5/86CfD71fw9EPmDxgiJX4I2Ddr6ZsV6iFXsuby+qWJPtmNuMY0zByTsG4468P7nHuNWA==",
"version": "16.11.0",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.11.0.tgz",
"integrity": "sha512-gbBVYR2p8mnriqAwWx9LbuUrShnAuSCNnuPGyc7GJrMVQtPDAh8iLpv7FRuMPFb56KkaVZIYSz1PrjI9q0QPCw==",
"dev": true
},
"read-pkg": {
@ -5021,13 +5021,13 @@
"dev": true
},
"uglify-js": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.2.tgz",
"integrity": "sha512-+gh/xFte41GPrgSMJ/oJVq15zYmqr74pY9VoM69UzMzq9NFk4YDylclb1/bhEzZSaUQjbW5RvniHeq1cdtRYjw==",
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.4.tgz",
"integrity": "sha512-9Yc2i881pF4BPGhjteCXQNaXx1DCwm3dtOyBaG2hitHjLWOczw/ki8vD1bqyT3u6K0Ms/FpCShkmfg+FtlOfYA==",
"dev": true,
"optional": true,
"requires": {
"commander": "2.20.0",
"commander": "~2.20.3",
"source-map": "~0.6.1"
}
},

View File

@ -1,6 +1,6 @@
{
"name": "setup-php",
"version": "1.4.3",
"version": "1.4.4",
"private": false,
"description": "Setup php action",
"main": "lib/setup-php.js",

View File

@ -165,7 +165,7 @@ export async function addExtensionLinux(
break;
default:
install_command =
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php' +
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php' +
version +
'-' +
extension +

View File

@ -44,7 +44,7 @@ async function run() {
await exec('sh ./' + version + 'darwin.sh ' + version);
} else if (os_version == 'win32') {
await build('win32.ps1', version, os_version);
await exec('powershell .\\' + version + 'win32.ps1 -version ' + version);
await exec('pwsh .\\' + version + 'win32.ps1 -version ' + version);
} else if (os_version == 'linux') {
await build('linux.sh', version, os_version);
await exec('./' + version + 'linux.sh ' + version);

View File

@ -23,11 +23,10 @@ step_log "Setup PHP and Composer"
if [ "$existing_version" != "$1" ]; then
if [ ! -e "/usr/bin/php$1" ]; then
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:ondrej/php -y >/dev/null 2>&1
sudo DEBIAN_FRONTEND=noninteractive apt update -y >/dev/null 2>&1
if [ "$1" != "7.4" ]; then
sudo DEBIAN_FRONTEND=noninteractive apt install -y php"$1" curl php"$1"-curl >/dev/null 2>&1
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" curl php"$1"-curl >/dev/null 2>&1
else
sudo DEBIAN_FRONTEND=noninteractive apt install -y php"$1" php"$1"-dev curl php"$1"-curl >/dev/null 2>&1
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" php"$1"-dev curl php"$1"-curl >/dev/null 2>&1
fi
status="Installed PHP$version"
fi

View File

@ -6,12 +6,12 @@ $tick = ([char]8730)
$cross = ([char]10007)
Function Step-Log($message) {
printf "\n\033[90;1m==> \033[0m\033[37;1m%s \033[0m" $message
printf "\n\033[90;1m==> \033[0m\033[37;1m%s \033[0m\n" $message
}
Function Add-Log($mark, $subject, $message) {
$code = if($mark -eq $cross) {"31"} else {"32"}
printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m" $code $mark $subject $message
printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $code $mark $subject $message
}
if($version -eq '7.4') {
@ -20,7 +20,6 @@ if($version -eq '7.4') {
Step-Log "Setup PhpManager"
Install-Module -Name PhpManager -Force -Scope CurrentUser
printf "\n"
Add-Log $tick "PhpManager" "Installed"
$installed = $($(php -v)[0] -join '')[4..6] -join ''
@ -30,12 +29,7 @@ if($installed -ne $version) {
if($version -lt '7.0') {
Install-Module -Name VcRedist -Force
}
Uninstall-Php C:\tools\php
Install-Php -Version $version -Architecture x86 -ThreadSafe $true -InstallVC -Path C:\tools\php$version -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1
(Get-PhpSwitcher).targets
Initialize-PhpSwitcher -Alias C:\tools\php -Scope CurrentUser -Force
Add-PhpToSwitcher -Name $version -Path C:\tools\php$version -Force
Switch-Php $version -Force
Install-Php -Version $version -Architecture x86 -ThreadSafe $true -InstallVC -Path C:\tools\php -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1
$status = "Installed PHP$version"
}
@ -44,8 +38,9 @@ Add-Content C:\tools\php\php.ini "date.timezone = 'UTC'"
Set-PhpIniKey extension_dir $ext_dir
if($version -lt '7.4') {
Enable-PhpExtension openssl
Enable-PhpExtension curl
} else {
Add-Content C:\tools\php\php.ini "extension=php_openssl.dll"
Add-Content C:\tools\php\php.ini "extension=php_openssl.dll`nextension=php_curl.dll"
Copy-Item "php_pcov.dll" -Destination $ext_dir"\php_pcov.dll"
}
Add-Log $tick "PHP" $status