From c11d023c03b016a1c3ff691ad946859f32373cea Mon Sep 17 00:00:00 2001
From: Shivam Mathur
Date: Wed, 27 Nov 2019 06:00:34 +0530
Subject: [PATCH 1/5] Add sage and bedrock example, add cache to examples
---
README.md | 3 ++
examples/bedrock.yml | 30 +++++++++++++++++++
examples/codeigniter.yml | 10 ++++++-
examples/laravel-mysql.yml | 10 ++++++-
examples/laravel-postgres.yml | 10 ++++++-
examples/laravel.yml | 10 ++++++-
examples/lumen-mysql.yml | 10 ++++++-
examples/lumen-postgres.yml | 10 ++++++-
examples/lumen.yml | 10 ++++++-
examples/phalcon-mysql.yml | 10 ++++++-
examples/phalcon-postgres.yml | 10 ++++++-
examples/sage.yml | 55 +++++++++++++++++++++++++++++++++++
examples/slim-framework.yml | 10 ++++++-
examples/symfony-mysql.yml | 10 ++++++-
examples/symfony-postgres.yml | 10 ++++++-
examples/symfony.yml | 10 ++++++-
examples/yii2-mysql.yml | 10 ++++++-
examples/yii2-postgres.yml | 10 ++++++-
examples/zend-framework.yml | 10 ++++++-
19 files changed, 232 insertions(+), 16 deletions(-)
create mode 100644 examples/bedrock.yml
create mode 100644 examples/sage.yml
diff --git a/README.md b/README.md
index c317a575..6584b3d3 100644
--- a/README.md
+++ b/README.md
@@ -219,9 +219,12 @@ Examples for setting up this GitHub Action with different PHP Frameworks/Package
|Lumen without services|`macOS`, `ubuntu` and `windows`|[lumen.yml](./examples/lumen.yml "GitHub Action for Lumen without services")|
|Phalcon with `MySQL`|`ubuntu`|[phalcon-mysql.yml](./examples/phalcon-mysql.yml "GitHub Action for Phalcon with MySQL")|
|Phalcon with `PostgreSQL`|`ubuntu`|[phalcon-postgres.yml](./examples/phalcon-postgres.yml "GitHub Action for Phalcon with PostgreSQL")|
+|Roots/bedrock|`ubuntu`|[bedrock.yml](./examples/bedrock.yml "GitHub Action for Wordpress Development using @roots/bedrock")|
+|Roots/sage|`ubuntu`|[sage.yml](./examples/sage.yml "GitHub Action for Wordpress Development using @roots/sage")|
|Slim Framework|`macOS`, `ubuntu` and `windows`|[slim-framework.yml](./examples/slim-framework.yml "GitHub Action for Slim Framework")|
|Symfony with `MySQL`|`ubuntu`|[symfony-mysql.yml](./examples/symfony-mysql.yml "GitHub Action for Symfony with MySQL")|
|Symfony with `PostgreSQL`|`ubuntu`|[symfony-postgres.yml](./examples/symfony-postgres.yml "GitHub Action for Symfony with PostgreSQL")|
+|Symfony without services|`macOS`, `ubuntu` and `windows`|[symfony.yml](./examples/symfony.yml "GitHub Action for Symfony without services")|
|Yii2 Starter Kit with `MySQL`|`ubuntu`|[yii2-mysql.yml](./examples/yii2-mysql.yml "GitHub Action for Yii2 Starter Kit with MySQL")|
|Yii2 Starter Kit with `PostgreSQL`|`ubuntu`|[yii2-postgres.yml](./examples/yii2-postgres.yml "GitHub Action for Yii2 Starter Kit with PostgreSQL")|
|Zend Framework|`macOS`, `ubuntu` and `windows`|[zend-framework.yml](./examples/zend-framework.yml "GitHub Action for Zend Framework")|
diff --git a/examples/bedrock.yml b/examples/bedrock.yml
new file mode 100644
index 00000000..76d6e13d
--- /dev/null
+++ b/examples/bedrock.yml
@@ -0,0 +1,30 @@
+# GitHub Action for roots/bedrock
+name: Testing Bedrock
+on: [push, pull_request]
+jobs:
+ bedrock:
+ name: Bedrock (PHP ${{ matrix.php-versions }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ php-versions: ['7.1', '7.2', '7.3', '7.4']
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+ - name: Setup PHP, with composer and extensions
+ uses: shivammathur/setup-php@master #https://github.com/shivammathur/setup-php
+ with:
+ php-version: ${{ matrix.php-versions }}
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
+ - name: Install Composer dependencies
+ run: composer install -n --prefer-dist
+ - name: PHP test
+ run: composer test
\ No newline at end of file
diff --git a/examples/codeigniter.yml b/examples/codeigniter.yml
index 782fa32b..4f935aa3 100644
--- a/examples/codeigniter.yml
+++ b/examples/codeigniter.yml
@@ -4,7 +4,6 @@ on: [push, pull_request]
jobs:
build:
strategy:
- max-parallel: 6
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.2', '7.3']
@@ -18,6 +17,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, curl, dom
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Test with phpunit
diff --git a/examples/laravel-mysql.yml b/examples/laravel-mysql.yml
index 376081e9..74ef9a15 100644
--- a/examples/laravel-mysql.yml
+++ b/examples/laravel-mysql.yml
@@ -30,7 +30,6 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.2', '7.3', '7.4']
steps:
@@ -42,6 +41,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
diff --git a/examples/laravel-postgres.yml b/examples/laravel-postgres.yml
index 52b28298..ab3b3747 100644
--- a/examples/laravel-postgres.yml
+++ b/examples/laravel-postgres.yml
@@ -32,7 +32,6 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.2', '7.3', '7.4']
steps:
@@ -44,6 +43,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
diff --git a/examples/laravel.yml b/examples/laravel.yml
index f6ef5db7..826e6b2b 100644
--- a/examples/laravel.yml
+++ b/examples/laravel.yml
@@ -7,7 +7,6 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
- max-parallel: 6
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.2', '7.3']
@@ -20,6 +19,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
diff --git a/examples/lumen-mysql.yml b/examples/lumen-mysql.yml
index 716b30ae..6e545eea 100644
--- a/examples/lumen-mysql.yml
+++ b/examples/lumen-mysql.yml
@@ -30,7 +30,6 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.2', '7.3']
steps:
@@ -42,6 +41,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
diff --git a/examples/lumen-postgres.yml b/examples/lumen-postgres.yml
index d1db7bc9..1a6138de 100644
--- a/examples/lumen-postgres.yml
+++ b/examples/lumen-postgres.yml
@@ -32,7 +32,6 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.2', '7.3']
steps:
@@ -44,6 +43,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
diff --git a/examples/lumen.yml b/examples/lumen.yml
index a2e6d052..bf7d03b2 100644
--- a/examples/lumen.yml
+++ b/examples/lumen.yml
@@ -7,7 +7,6 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
- max-parallel: 9
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.2', '7.3']
@@ -20,6 +19,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
diff --git a/examples/phalcon-mysql.yml b/examples/phalcon-mysql.yml
index 178b2bd6..516fb823 100644
--- a/examples/phalcon-mysql.yml
+++ b/examples/phalcon-mysql.yml
@@ -28,7 +28,6 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.2', '7.3', '7.4']
steps:
@@ -40,6 +39,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, zip, phalcon4, mysql #use phalcon3 for the phalcon 3.x.
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
diff --git a/examples/phalcon-postgres.yml b/examples/phalcon-postgres.yml
index 5ff36b6c..5dafa83f 100644
--- a/examples/phalcon-postgres.yml
+++ b/examples/phalcon-postgres.yml
@@ -29,7 +29,6 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.2', '7.3', '7.4']
steps:
@@ -41,6 +40,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, zip, phalcon4, pgsql #use phalcon3 for the phalcon 3.x
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
diff --git a/examples/sage.yml b/examples/sage.yml
new file mode 100644
index 00000000..84d3c212
--- /dev/null
+++ b/examples/sage.yml
@@ -0,0 +1,55 @@
+# GitHub Action for roots/sage
+name: Testing Sage
+on: [push, pull_request]
+jobs:
+ sage:
+ name: Sage (PHP ${{ matrix.php-versions }} & Node ${{ matrix.node-versions }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ php-versions: ['7.1', '7.2', '7.3', '7.4']
+ node-versions: ['8', '10']
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+ - name: Setup Node.js
+ uses: actions/setup-node@master
+ with:
+ node-version: ${{ matrix.node-versions }}
+ - name: Setup PHP, with composer and extensions
+ uses: shivammathur/setup-php@master #https://github.com/shivammathur/setup-php
+ with:
+ php-version: ${{ matrix.php-versions }}
+ extension-csv: mbstring
+ - name: Check node versions
+ run: node -v
+ - name: Get yarn cache
+ id: yarn-cache
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+ - uses: actions/cache@v1
+ with:
+ path: ${{ steps.yarn-cache.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: ${{ runner.os }}-yarn-
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
+ - name: Install yarn dependencies
+ run: yarn -V
+ - name: Install Composer dependencies
+ run: composer install -o --prefer-dist --no-interaction
+ - name: Yarn test and build
+ run: |
+ yarn run test
+ yarn run build
+ yarn run rmdist
+ yarn run "build:production"
+ - name: PHP test
+ run: composer test
\ No newline at end of file
diff --git a/examples/slim-framework.yml b/examples/slim-framework.yml
index 31b03a6f..53c84c58 100644
--- a/examples/slim-framework.yml
+++ b/examples/slim-framework.yml
@@ -4,7 +4,6 @@ on: [push, pull_request]
jobs:
build:
strategy:
- max-parallel: 6
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.2', '7.3']
@@ -18,6 +17,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, simplexml, dom
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Test with phpunit
diff --git a/examples/symfony-mysql.yml b/examples/symfony-mysql.yml
index 9d437f0d..b2304a3c 100644
--- a/examples/symfony-mysql.yml
+++ b/examples/symfony-mysql.yml
@@ -17,7 +17,6 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.3']
steps:
@@ -29,6 +28,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv, mysql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
diff --git a/examples/symfony-postgres.yml b/examples/symfony-postgres.yml
index 5557f763..e2774a4c 100644
--- a/examples/symfony-postgres.yml
+++ b/examples/symfony-postgres.yml
@@ -17,7 +17,6 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.3']
steps:
@@ -29,6 +28,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv, pgsql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
diff --git a/examples/symfony.yml b/examples/symfony.yml
index e8ac1bb7..c46ece7b 100644
--- a/examples/symfony.yml
+++ b/examples/symfony.yml
@@ -7,7 +7,6 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
- max-parallel: 3
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.3']
@@ -20,6 +19,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer require symfony/orm-pack
diff --git a/examples/yii2-mysql.yml b/examples/yii2-mysql.yml
index e826f7b4..dacf8b65 100644
--- a/examples/yii2-mysql.yml
+++ b/examples/yii2-mysql.yml
@@ -23,7 +23,6 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.2', '7.3', '7.4']
steps:
@@ -39,6 +38,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, gd, imagick, zip, dom, mysql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
diff --git a/examples/yii2-postgres.yml b/examples/yii2-postgres.yml
index 205bc426..d8f6c0c7 100644
--- a/examples/yii2-postgres.yml
+++ b/examples/yii2-postgres.yml
@@ -23,7 +23,6 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
strategy:
fail-fast: false
- max-parallel: 3
matrix:
php-versions: ['7.2', '7.3', '7.4']
steps:
@@ -39,6 +38,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, gd, imagick, zip, dom, pgsql
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
diff --git a/examples/zend-framework.yml b/examples/zend-framework.yml
index 9fe5161e..2d34a3c9 100644
--- a/examples/zend-framework.yml
+++ b/examples/zend-framework.yml
@@ -4,7 +4,6 @@ on: [push, pull_request]
jobs:
build:
strategy:
- max-parallel: 6
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.2', '7.3']
@@ -18,6 +17,15 @@ jobs:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, bcmath, curl, intl
coverage: xdebug #optional
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
From a29956826a907b4e0356891d50a9e1e3c2658198 Mon Sep 17 00:00:00 2001
From: Shivam Mathur
Date: Wed, 27 Nov 2019 20:26:36 +0530
Subject: [PATCH 2/5] Edit README and workflow
---
.github/workflows/workflow.yml | 2 ++
README.md | 7 +++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml
index d6e1e881..b8023401 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -7,6 +7,7 @@ on:
- verbose
paths-ignore:
- '**.md'
+ - 'examples/**'
push:
branches:
- master
@@ -14,6 +15,7 @@ on:
- verbose
paths-ignore:
- '**.md'
+ - 'examples/**'
jobs:
run:
name: Run
diff --git a/README.md b/README.md
index 6584b3d3..06e568de 100644
--- a/README.md
+++ b/README.md
@@ -10,9 +10,7 @@
-
-
-
+
Setup PHP with required extensions, php.ini configuration and composer in [GitHub Actions](https://github.com/features/actions "GitHub Actions"). This action can be added as a step in your action workflow and it will setup the PHP environment you need to test your application. Refer to [Usage](#memo-usage "How to use this") section and [examples](#examples "Examples of use") to see how to use this.
@@ -243,7 +241,8 @@ If this action helped you.
- Please star the project and share it, this helps reach more people.
- If you blog, write about your experience using this.
-- Support on this project on
or using
.
+- Support this project on
or using
.
+- If you need using this GitHub Action for your project, you can contact me here
## :bookmark: This action uses the following works
From 22f5ad47d2ee65bab9361565bf7760154104cdcc Mon Sep 17 00:00:00 2001
From: Shivam Mathur
Date: Wed, 27 Nov 2019 20:36:58 +0530
Subject: [PATCH 3/5] Handle exception in Update-PhpCAInfo in win32.ps1
---
src/scripts/win32.ps1 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1
index 13bd9cca..1d3a2155 100644
--- a/src/scripts/win32.ps1
+++ b/src/scripts/win32.ps1
@@ -50,7 +50,10 @@ try {
Update-PhpCAInfo -Path $php_dir -Source CurrentUser
}
catch {
- Update-PhpCAInfo -Path $php_dir -Source Curl
+ try {
+ Update-PhpCAInfo -Path $php_dir -Source Curl
+ } catch {
+ }
}
if ([Version]$installed.Version -ge '7.4') {
Copy-Item "$dir\..\src\ext\php_pcov.dll" -Destination "$($installed.ExtensionsPath)\php_pcov.dll"
From 44815f1f7360d513c49a5b8e1472e8b6a38d234c Mon Sep 17 00:00:00 2001
From: Shivam Mathur
Date: Wed, 27 Nov 2019 20:44:27 +0530
Subject: [PATCH 4/5] Fix workflow and bump version
---
.github/workflows/workflow.yml | 13 ----
package-lock.json | 116 +++++++++++++++------------------
package.json | 2 +-
3 files changed, 52 insertions(+), 79 deletions(-)
diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml
index b8023401..2935cf06 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -36,20 +36,7 @@ jobs:
with:
node-version: 12.x
- - name: Get npm cache directory
- id: npm-cache
- run: echo "::set-output name=dir::$(npm config get cache)"
-
- name: Install dependencies
- uses: actions/cache@v1
- with:
- path: ${{ steps.npm-cache.outputs.dir }}
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
-
- - name: Installing NPM packages
- if: steps.cache.outputs.cache-hit != 'true'
run: npm install
- name: Prettier Format Check
diff --git a/package-lock.json b/package-lock.json
index 9a963037..4817f005 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "setup-php",
- "version": "1.5.4",
+ "version": "1.5.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -510,9 +510,9 @@
"dev": true
},
"@types/node": {
- "version": "12.12.12",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.12.tgz",
- "integrity": "sha512-MGuvYJrPU0HUwqF7LqvIj50RZUX23Z+m583KBygKYUZLlZ88n6w28XRNJRJgsHukLEnLz6w6SvxZoLgbr5wLqQ==",
+ "version": "12.12.14",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz",
+ "integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==",
"dev": true
},
"@types/normalize-package-data": {
@@ -543,12 +543,12 @@
"dev": true
},
"@typescript-eslint/eslint-plugin": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.8.0.tgz",
- "integrity": "sha512-ohqul5s6XEB0AzPWZCuJF5Fd6qC0b4+l5BGEnrlpmvXxvyymb8yw8Bs4YMF8usNAeuCJK87eFIHy8g8GFvOtGA==",
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.9.0.tgz",
+ "integrity": "sha512-98rfOt3NYn5Gr9wekTB8TexxN6oM8ZRvYuphPs1Atfsy419SDLYCaE30aJkRiiTCwGEY98vOhFsEVm7Zs4toQQ==",
"dev": true,
"requires": {
- "@typescript-eslint/experimental-utils": "2.8.0",
+ "@typescript-eslint/experimental-utils": "2.9.0",
"eslint-utils": "^1.4.3",
"functional-red-black-tree": "^1.0.1",
"regexpp": "^3.0.0",
@@ -556,32 +556,32 @@
}
},
"@typescript-eslint/experimental-utils": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.8.0.tgz",
- "integrity": "sha512-jZ05E4SxCbbXseQGXOKf3ESKcsGxT8Ucpkp1jiVp55MGhOvZB2twmWKf894PAuVQTCgbPbJz9ZbRDqtUWzP8xA==",
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.9.0.tgz",
+ "integrity": "sha512-0lOLFdpdJsCMqMSZT7l7W2ta0+GX8A3iefG3FovJjrX+QR8y6htFlFdU7aOVPL6pDvt6XcsOb8fxk5sq+girTw==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.3",
- "@typescript-eslint/typescript-estree": "2.8.0",
+ "@typescript-eslint/typescript-estree": "2.9.0",
"eslint-scope": "^5.0.0"
}
},
"@typescript-eslint/parser": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.8.0.tgz",
- "integrity": "sha512-NseXWzhkucq+JM2HgqAAoKEzGQMb5LuTRjFPLQzGIdLthXMNUfuiskbl7QSykvWW6mvzCtYbw1fYWGa2EIaekw==",
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.9.0.tgz",
+ "integrity": "sha512-fJ+dNs3CCvEsJK2/Vg5c2ZjuQ860ySOAsodDPwBaVlrGvRN+iCNC8kUfLFL8cT49W4GSiLPa/bHiMjYXA7EhKQ==",
"dev": true,
"requires": {
"@types/eslint-visitor-keys": "^1.0.0",
- "@typescript-eslint/experimental-utils": "2.8.0",
- "@typescript-eslint/typescript-estree": "2.8.0",
+ "@typescript-eslint/experimental-utils": "2.9.0",
+ "@typescript-eslint/typescript-estree": "2.9.0",
"eslint-visitor-keys": "^1.1.0"
}
},
"@typescript-eslint/typescript-estree": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.8.0.tgz",
- "integrity": "sha512-ksvjBDTdbAQ04cR5JyFSDX113k66FxH1tAXmi+dj6hufsl/G0eMc/f1GgLjEVPkYClDbRKv+rnBFuE5EusomUw==",
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.9.0.tgz",
+ "integrity": "sha512-v6btSPXEWCP594eZbM+JCXuFoXWXyF/z8kaSBSdCb83DF+Y7+xItW29SsKtSULgLemqJBT+LpT+0ZqdfH7QVmA==",
"dev": true,
"requires": {
"debug": "^4.1.1",
@@ -622,9 +622,9 @@
},
"dependencies": {
"acorn": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz",
- "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==",
+ "version": "6.4.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
+ "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==",
"dev": true
}
}
@@ -788,9 +788,9 @@
"dev": true
},
"aws4": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
- "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz",
+ "integrity": "sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==",
"dev": true
},
"babel-jest": {
@@ -1558,18 +1558,18 @@
}
},
"es-abstract": {
- "version": "1.16.0",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz",
- "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==",
+ "version": "1.16.2",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.2.tgz",
+ "integrity": "sha512-jYo/J8XU2emLXl3OLwfwtuFfuF2w6DYPs+xy9ZfVyPkDcrauu6LYrw/q2TyCtrbc/KUdCiC5e9UajRhgNkVopA==",
"dev": true,
"requires": {
- "es-to-primitive": "^1.2.0",
+ "es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
- "has-symbols": "^1.0.0",
+ "has-symbols": "^1.0.1",
"is-callable": "^1.1.4",
"is-regex": "^1.0.4",
- "object-inspect": "^1.6.0",
+ "object-inspect": "^1.7.0",
"object-keys": "^1.1.1",
"string.prototype.trimleft": "^2.1.0",
"string.prototype.trimright": "^2.1.0"
@@ -1614,9 +1614,9 @@
}
},
"eslint": {
- "version": "6.7.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.0.tgz",
- "integrity": "sha512-dQpj+PaHKHfXHQ2Imcw5d853PTvkUGbHk/MR68KQUl98EgKDCdh4vLRH1ZxhqeQjQFJeg8fgN0UwmNhN3l8dDQ==",
+ "version": "6.7.1",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.1.tgz",
+ "integrity": "sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -1776,9 +1776,9 @@
}
},
"eslint-plugin-jest": {
- "version": "23.0.4",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.0.4.tgz",
- "integrity": "sha512-OaP8hhT8chJNodUPvLJ6vl8gnalcsU/Ww1t9oR3HnGdEWjm/DdCCUXLOral+IPGAeWu/EwgVQCK/QtxALpH1Yw==",
+ "version": "23.0.5",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.0.5.tgz",
+ "integrity": "sha512-etxXrWsFWzxsrxKwJnFC38uppH/vlJ3oF7Wmp/cxedqxRIxVhXup8e5y5MmtVXelevgxrgA1QS1vo8j889iK5Q==",
"dev": true,
"requires": {
"@typescript-eslint/experimental-utils": "^2.5.0"
@@ -2249,14 +2249,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -2271,20 +2269,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"core-util-is": {
"version": "1.0.2",
@@ -2401,8 +2396,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"ini": {
"version": "1.3.5",
@@ -2414,7 +2408,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -2429,7 +2422,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -2437,14 +2429,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -2463,7 +2453,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -2544,8 +2533,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -2557,7 +2545,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"wrappy": "1"
}
@@ -2679,7 +2666,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -5009,9 +4995,9 @@
"dev": true
},
"resolve": {
- "version": "1.12.2",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.2.tgz",
- "integrity": "sha512-cAVTI2VLHWYsGOirfeYVVQ7ZDejtQ9fp4YhYckWDEkFfqbVjaT11iM8k6xSAfGFMM+gDpZjMnFssPu8we+mqFw==",
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz",
+ "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -5974,9 +5960,9 @@
"dev": true
},
"uglify-js": {
- "version": "3.6.9",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz",
- "integrity": "sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==",
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.0.tgz",
+ "integrity": "sha512-PC/ee458NEMITe1OufAjal65i6lB58R1HWMRcxwvdz1UopW0DYqlRL3xdu3IcTvTXsB02CRHykidkTRL+A3hQA==",
"dev": true,
"optional": true,
"requires": {
diff --git a/package.json b/package.json
index 5e36d768..aab574e7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "setup-php",
- "version": "1.5.4",
+ "version": "1.5.5",
"private": false,
"description": "Setup PHP for use with GitHub Actions",
"main": "dist/index.js",
From e05bc317ec37a44646915e5d2d73585dc2e7c907 Mon Sep 17 00:00:00 2001
From: Shivam Mathur
Date: Wed, 27 Nov 2019 20:55:51 +0530
Subject: [PATCH 5/5] Fix README
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 06e568de..3e720529 100644
--- a/README.md
+++ b/README.md
@@ -242,7 +242,7 @@ If this action helped you.
- Please star the project and share it, this helps reach more people.
- If you blog, write about your experience using this.
- Support this project on
or using
.
-- If you need using this GitHub Action for your project, you can contact me here
+- If you need any help using this, reach out here
## :bookmark: This action uses the following works