Skip to content

Commit

Permalink
Add sage and bedrock example, add cache to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Nov 27, 2019
1 parent cade5f7 commit c11d023
Show file tree
Hide file tree
Showing 19 changed files with 232 additions and 16 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")|
Expand Down
30 changes: 30 additions & 0 deletions examples/bedrock.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 9 additions & 1 deletion examples/codeigniter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/laravel-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/laravel-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/lumen-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/lumen-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/lumen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/phalcon-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/phalcon-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
55 changes: 55 additions & 0 deletions examples/sage.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 9 additions & 1 deletion examples/slim-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/symfony-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion examples/symfony-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
Loading

0 comments on commit c11d023

Please sign in to comment.