Improve readme and workflow

This commit is contained in:
Shivam Mathur 2019-11-30 05:23:14 +05:30
parent 2f951ef5cd
commit ddcacf4760
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
4 changed files with 36 additions and 42 deletions

View File

@ -24,7 +24,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest] operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3'] php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
@ -61,13 +61,22 @@ jobs:
ini-values-csv: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional ini-values-csv: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional
- name: Testing PHP version - name: Testing PHP version
run: php -v run: |
php -v
php -r "if(strpos(phpversion(), '${{ matrix.php-versions }}') === false) {throw new Exception('Wrong PHP version Installed');}"
- name: Testing Composer version - name: Testing Composer version
run: composer -V run: |
composer -V
php -r "if(strpos(@exec('composer -V'), 'Composer version') === false) {throw new Exception('Composer not found');}"
- name: Testing Extensions - name: Testing Extensions
run: php -m run: |
php -m
php -r "if(! extension_loaded('mbstring')) {throw new Exception('mbstring not found');}"
php -r "if(! extension_loaded('Xdebug')) {throw new Exception('Xdebug not found');}"
php -r "if(phpversion()>=7.1 && ! extension_loaded('pcov')) {throw new Exception('PCOV not found');}"
- name: Testing ini values - name: Testing ini values
run: | run: |
printf "post_max_size: %s\n" $(php -r "echo ini_get('post_max_size');") php -r "if(ini_get('post_max_size')!='256M') {throw new Exception('post_max_size not added');}"
printf "short_open_tag: %s\n" $(php -r "echo ini_get('short_open_tag');") php -r "if(ini_get('short_open_tag')!=1) {throw new Exception('short_open_tag not added');}"
printf "date.timezone: %s\n" $(php -r "echo ini_get('date.timezone');") php -r "if(ini_get('date.timezone')!='Asia/Kolkata') {throw new Exception('date.timezone not added');}"

View File

@ -72,7 +72,7 @@ Runs on all [PHP versions supported](#tada-php-support "List of PHP versions sup
```yaml ```yaml
uses: shivammathur/setup-php@v1 uses: shivammathur/setup-php@v1
with: with:
php-version: '7.3' php-version: '7.4'
coverage: xdebug coverage: xdebug
``` ```
@ -87,7 +87,7 @@ If your source code directory is other than `src`, `lib` or, `app`, specify `pco
```yaml ```yaml
uses: shivammathur/setup-php@v1 uses: shivammathur/setup-php@v1
with: with:
php-version: '7.3' php-version: '7.4'
ini-values-csv: pcov.directory=api #optional, see above for usage. ini-values-csv: pcov.directory=api #optional, see above for usage.
coverage: pcov coverage: pcov
``` ```
@ -104,7 +104,7 @@ Consider disabling the coverage using this PHP action for these reasons.
```yaml ```yaml
uses: shivammathur/setup-php@v1 uses: shivammathur/setup-php@v1
with: with:
php-version: '7.3' php-version: '7.4'
coverage: none coverage: none
``` ```
@ -130,7 +130,7 @@ steps:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v1 uses: shivammathur/setup-php@v1
with: with:
php-version: '7.3' php-version: '7.4'
extension-csv: mbstring, intl #optional, setup extensions extension-csv: mbstring, intl #optional, setup extensions
ini-values-csv: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration ini-values-csv: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
coverage: xdebug #optional, setup coverage driver coverage: xdebug #optional, setup coverage driver
@ -155,7 +155,7 @@ jobs:
strategy: strategy:
matrix: matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest] operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3'] php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps: steps:
- name: Checkout - name: Checkout
@ -250,7 +250,6 @@ If this action helped you.
- [Homebrew](https://brew.sh/ "MacOS package manager") - [Homebrew](https://brew.sh/ "MacOS package manager")
- [ppa:ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php "Pre-compiled ubuntu packages") - [ppa:ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php "Pre-compiled ubuntu packages")
- [exolnet/homebrew-deprecated](https://github.com/eXolnet/homebrew-deprecated "Pre-compiled deprecated PHP for macOS") - [exolnet/homebrew-deprecated](https://github.com/eXolnet/homebrew-deprecated "Pre-compiled deprecated PHP for macOS")
- [phpbrew](https://github.com/phpbrew/phpbrew "PHP packages manager")
## :bookmark_tabs: Further Reading ## :bookmark_tabs: Further Reading

42
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "setup-php", "name": "setup-php",
"version": "1.5.5", "version": "1.5.6",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -1776,9 +1776,9 @@
} }
}, },
"eslint-plugin-jest": { "eslint-plugin-jest": {
"version": "23.0.5", "version": "23.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.0.5.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.1.0.tgz",
"integrity": "sha512-etxXrWsFWzxsrxKwJnFC38uppH/vlJ3oF7Wmp/cxedqxRIxVhXup8e5y5MmtVXelevgxrgA1QS1vo8j889iK5Q==", "integrity": "sha512-KHy1K0647bn86NTcWhWGoEIF9VgQ8YxR9hHZf/wQ4OvDwjRx27uk+mqvyZakWnRvIWFS/L25JNs4rnhsiE0adg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/experimental-utils": "^2.5.0" "@typescript-eslint/experimental-utils": "^2.5.0"
@ -2249,14 +2249,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -2271,20 +2269,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -2401,8 +2396,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -2414,7 +2408,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -2429,7 +2422,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -2437,14 +2429,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -2463,7 +2453,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -2544,8 +2533,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -2557,7 +2545,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -2679,7 +2666,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -4833,9 +4819,9 @@
} }
}, },
"psl": { "psl": {
"version": "1.4.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.5.0.tgz",
"integrity": "sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==", "integrity": "sha512-4vqUjKi2huMu1OJiLhi3jN6jeeKvMZdI1tYgi/njW5zV52jNLgSAZSdN16m9bJFe61/cT8ulmw4qFitV9QRsEA==",
"dev": true "dev": true
}, },
"pump": { "pump": {

View File

@ -1,6 +1,6 @@
{ {
"name": "setup-php", "name": "setup-php",
"version": "1.5.5", "version": "1.5.6",
"private": false, "private": false,
"description": "Setup PHP for use with GitHub Actions", "description": "Setup PHP for use with GitHub Actions",
"main": "dist/index.js", "main": "dist/index.js",