setup-php 2.12.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +977 -936
- package/package.json +66 -56
- package/src/config.ts +82 -82
- package/src/configs/brew_extensions +30 -0
- package/src/configs/os_releases.csv +17 -0
- package/src/configs/php-versions.json +6 -5
- package/src/configs/{php.json → pm/php.json} +29 -29
- package/src/configs/{phpunit.json → pm/phpunit.json} +24 -24
- package/src/configs/tools.json +256 -234
- package/src/configs/tools_schema.json +114 -103
- package/src/coverage.ts +169 -142
- package/src/extensions.ts +363 -349
- package/src/install.ts +79 -82
- package/src/scripts/common.sh +366 -314
- package/src/scripts/darwin.sh +257 -248
- package/src/scripts/ext/blackfire.ps1 +32 -32
- package/src/scripts/ext/blackfire.sh +22 -21
- package/src/scripts/ext/couchbase.sh +43 -43
- package/src/scripts/ext/cubrid.sh +60 -60
- package/src/scripts/ext/extension_map.php +109 -0
- package/src/scripts/ext/firebird.ps1 +19 -19
- package/src/scripts/ext/firebird.sh +39 -35
- package/src/scripts/ext/gearman.sh +22 -22
- package/src/scripts/ext/geos.sh +17 -17
- package/src/scripts/ext/http.ps1 +54 -54
- package/src/scripts/ext/http.sh +120 -120
- package/src/scripts/ext/intl.sh +23 -23
- package/src/scripts/ext/ioncube.ps1 +33 -32
- package/src/scripts/ext/ioncube.sh +21 -19
- package/src/scripts/ext/oci.ps1 +60 -60
- package/src/scripts/ext/oci.sh +65 -63
- package/src/scripts/ext/patches/firebird.sh +11 -11
- package/src/scripts/ext/patches/geos.sh +7 -7
- package/src/scripts/ext/patches/http.sh +11 -11
- package/src/scripts/ext/patches/pdo_oci.sh +6 -6
- package/src/scripts/ext/patches/phpize.sh +26 -26
- package/src/scripts/ext/patches/protobuf.sh +4 -4
- package/src/scripts/ext/phalcon.ps1 +54 -55
- package/src/scripts/ext/phalcon.sh +59 -59
- package/src/scripts/ext/source.sh +144 -144
- package/src/scripts/linux.sh +239 -280
- package/src/scripts/tools/add_tools.ps1 +28 -25
- package/src/scripts/tools/add_tools.sh +27 -19
- package/src/scripts/tools/blackfire.ps1 +19 -21
- package/src/scripts/tools/blackfire.sh +40 -35
- package/src/scripts/tools/grpc_php_plugin.ps1 +21 -21
- package/src/scripts/tools/grpc_php_plugin.sh +58 -61
- package/src/scripts/tools/ppa.sh +189 -0
- package/src/scripts/tools/protoc.ps1 +38 -38
- package/src/scripts/tools/protoc.sh +28 -28
- package/src/scripts/win32.ps1 +566 -471
- package/src/tools.ts +538 -509
- package/src/utils.ts +503 -497
- package/.eslintrc.json +0 -16
- package/.github/CODE_OF_CONDUCT.md +0 -76
- package/.github/CONTRIBUTING.md +0 -70
- package/.github/FUNDING.yml +0 -7
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -42
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -37
- package/.github/SECURITY.md +0 -29
- package/.github/workflows/docs.yml +0 -77
- package/.github/workflows/node-workflow.yml +0 -51
- package/.github/workflows/workflow.yml +0 -78
- package/.idea/workspace.xml +0 -113
- package/.prettierrc.json +0 -12
- package/__tests__/config.test.ts +0 -52
- package/__tests__/coverage.test.ts +0 -110
- package/__tests__/extensions.test.ts +0 -261
- package/__tests__/install.test.ts +0 -175
- package/__tests__/tools.test.ts +0 -490
- package/__tests__/utils.test.ts +0 -303
- package/action.yml +0 -29
- package/dist/index.js +0 -3001
- package/examples/bedrock.yml +0 -32
- package/examples/blackfire-player.yml +0 -31
- package/examples/blackfire.yml +0 -31
- package/examples/cakephp-mysql.yml +0 -114
- package/examples/cakephp-postgres.yml +0 -112
- package/examples/cakephp.yml +0 -92
- package/examples/codeigniter.yml +0 -34
- package/examples/laravel-mysql.yml +0 -74
- package/examples/laravel-postgres.yml +0 -74
- package/examples/laravel.yml +0 -42
- package/examples/lumen-mysql.yml +0 -74
- package/examples/lumen-postgres.yml +0 -74
- package/examples/lumen.yml +0 -38
- package/examples/phalcon-mysql.yml +0 -74
- package/examples/phalcon-postgres.yml +0 -73
- package/examples/sage.yml +0 -57
- package/examples/slim-framework.yml +0 -34
- package/examples/symfony-mysql.yml +0 -57
- package/examples/symfony-postgres.yml +0 -55
- package/examples/symfony.yml +0 -39
- package/examples/yii2-mysql.yml +0 -73
- package/examples/yii2-postgres.yml +0 -71
- package/examples/zend-framework.yml +0 -36
- package/jest.config.js +0 -12
- package/lib/config.js +0 -72
- package/lib/config.js.map +0 -1
- package/lib/coverage.js +0 -88
- package/lib/coverage.js.map +0 -1
- package/lib/extensions.js +0 -201
- package/lib/extensions.js.map +0 -1
- package/lib/install.js +0 -82
- package/lib/install.js.map +0 -1
- package/lib/sapi.js +0 -64
- package/lib/tools.js +0 -387
- package/lib/tools.js.map +0 -1
- package/lib/utils.js +0 -292
- package/lib/utils.js.map +0 -1
- package/tsconfig.json +0 -18
package/examples/bedrock.yml
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# GitHub Action for roots/bedrock
|
|
2
|
-
name: Testing Bedrock
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
bedrock:
|
|
6
|
-
name: Bedrock (PHP ${{ matrix.php-versions }})
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
strategy:
|
|
9
|
-
fail-fast: false
|
|
10
|
-
matrix:
|
|
11
|
-
php-versions: ['7.1', '7.2', '7.3', '7.4']
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout
|
|
14
|
-
uses: actions/checkout@v2
|
|
15
|
-
- name: Setup PHP, with composer and extensions
|
|
16
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
17
|
-
with:
|
|
18
|
-
php-version: ${{ matrix.php-versions }}
|
|
19
|
-
- name: Get composer cache directory
|
|
20
|
-
id: composer-cache
|
|
21
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
22
|
-
- uses: actions/cache@v2
|
|
23
|
-
with:
|
|
24
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
25
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
26
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
27
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
28
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
29
|
-
- name: Install Composer dependencies
|
|
30
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
31
|
-
- name: PHP test
|
|
32
|
-
run: composer test
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Blackfire Player
|
|
2
|
-
name: Play a Blackfire Scenario
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
blackfire-player:
|
|
6
|
-
name: Blackfire (PHP ${{ matrix.php-versions }})
|
|
7
|
-
# Add your Blackfire credentials securely using GitHub Secrets
|
|
8
|
-
env:
|
|
9
|
-
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
|
|
10
|
-
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
|
|
11
|
-
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
|
|
12
|
-
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}
|
|
13
|
-
runs-on: ${{ matrix.operating-system }}
|
|
14
|
-
strategy:
|
|
15
|
-
fail-fast: false
|
|
16
|
-
matrix:
|
|
17
|
-
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
18
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
19
|
-
# blackfire-player supports PHP >= 5.5
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout
|
|
22
|
-
uses: actions/checkout@v2
|
|
23
|
-
- name: Setup PHP, with composer and extensions
|
|
24
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
25
|
-
with:
|
|
26
|
-
php-version: ${{ matrix.php-versions }}
|
|
27
|
-
extensions: blackfire
|
|
28
|
-
tools: blackfire, blackfire-player #Setup Blackfire client, agent and player
|
|
29
|
-
coverage: none
|
|
30
|
-
- name: Play the scenario
|
|
31
|
-
run: blackfire-player run scenario.bkf # Refer to https://blackfire.io/docs/player/index#usage
|
package/examples/blackfire.yml
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Blackfire
|
|
2
|
-
name: Profiling with blackfire
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
blackfire:
|
|
6
|
-
name: Blackfire (PHP ${{ matrix.php-versions }})
|
|
7
|
-
# Add your Blackfire credentials securely using GitHub Secrets
|
|
8
|
-
env:
|
|
9
|
-
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
|
|
10
|
-
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
|
|
11
|
-
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
|
|
12
|
-
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}
|
|
13
|
-
runs-on: ${{ matrix.operating-system }}
|
|
14
|
-
strategy:
|
|
15
|
-
fail-fast: false
|
|
16
|
-
matrix:
|
|
17
|
-
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
18
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
19
|
-
# Blackfire supports PHP >= 5.3 on ubuntu and macos and PHP >= 5.4 on windows
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout
|
|
22
|
-
uses: actions/checkout@v2
|
|
23
|
-
- name: Setup PHP, with composer and extensions
|
|
24
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
25
|
-
with:
|
|
26
|
-
php-version: ${{ matrix.php-versions }}
|
|
27
|
-
extensions: blackfire
|
|
28
|
-
tools: blackfire #Setup Blackfire client and agent
|
|
29
|
-
coverage: none
|
|
30
|
-
- name: Profile
|
|
31
|
-
run: blackfire run php my-script.php # Refer to https://blackfire.io/docs/cookbooks/profiling-cli
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# GitHub Action for CakePHP with MySQL and Redis
|
|
2
|
-
# Tested with https://github.com/cakephp/app
|
|
3
|
-
name: Testing CakePHP with MySQL
|
|
4
|
-
on: [push, pull_request]
|
|
5
|
-
jobs:
|
|
6
|
-
tests:
|
|
7
|
-
strategy:
|
|
8
|
-
matrix:
|
|
9
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
services:
|
|
12
|
-
mysql:
|
|
13
|
-
image: mysql:5.7
|
|
14
|
-
env:
|
|
15
|
-
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
|
16
|
-
MYSQL_ROOT_PASSWORD: password
|
|
17
|
-
MYSQL_DATABASE: cakephp
|
|
18
|
-
ports:
|
|
19
|
-
- 3306/tcp
|
|
20
|
-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
21
|
-
redis:
|
|
22
|
-
image: redis
|
|
23
|
-
ports:
|
|
24
|
-
- 6379/tcp
|
|
25
|
-
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
26
|
-
steps:
|
|
27
|
-
- name: Checkout
|
|
28
|
-
uses: actions/checkout@v2
|
|
29
|
-
- name: Setup PHP
|
|
30
|
-
uses: shivammathur/setup-php@v2
|
|
31
|
-
with:
|
|
32
|
-
php-version: ${{ matrix.php-versions }}
|
|
33
|
-
# You can also use ext-apcu or ext-memcached instead of ext-redis
|
|
34
|
-
# Install memcached if using ext-memcached
|
|
35
|
-
extensions: mbstring, intl, redis, pdo_mysql
|
|
36
|
-
coverage: pcov
|
|
37
|
-
- name: Start mysql service
|
|
38
|
-
run: sudo /etc/init.d/mysql start
|
|
39
|
-
- name: Get composer cache directory
|
|
40
|
-
id: composer-cache
|
|
41
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
42
|
-
- name: Cache composer dependencies
|
|
43
|
-
uses: actions/cache@v2
|
|
44
|
-
with:
|
|
45
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
46
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
47
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
48
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
49
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
50
|
-
- name: Install dependencies
|
|
51
|
-
run: |
|
|
52
|
-
composer install --no-progress --prefer-dist --optimize-autoloader
|
|
53
|
-
composer run-script post-install-cmd --no-interaction
|
|
54
|
-
# Add a step to run migrations if required
|
|
55
|
-
- name: Test with phpunit
|
|
56
|
-
run: vendor/bin/phpunit --coverage-text
|
|
57
|
-
env:
|
|
58
|
-
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
|
59
|
-
DB_DSN: "mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/cakephp?init[]=SET sql_mode = \"STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\""
|
|
60
|
-
|
|
61
|
-
coding-standard:
|
|
62
|
-
name: Coding Standard
|
|
63
|
-
runs-on: ubuntu-latest
|
|
64
|
-
steps:
|
|
65
|
-
- name: Checkout
|
|
66
|
-
uses: actions/checkout@v2
|
|
67
|
-
- name: Setup PHP
|
|
68
|
-
uses: shivammathur/setup-php@v2
|
|
69
|
-
with:
|
|
70
|
-
php-version: '7.3'
|
|
71
|
-
extensions: mbstring, intl
|
|
72
|
-
- name: Get composer cache directory
|
|
73
|
-
id: composer-cache
|
|
74
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
75
|
-
- name: Cache composer dependencies
|
|
76
|
-
uses: actions/cache@v2
|
|
77
|
-
with:
|
|
78
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
79
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
80
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
81
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
82
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
83
|
-
- name: Install dependencies
|
|
84
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
85
|
-
- name: PHP CodeSniffer
|
|
86
|
-
run: composer cs-check
|
|
87
|
-
|
|
88
|
-
static-analysis:
|
|
89
|
-
name: Static Analysis
|
|
90
|
-
runs-on: ubuntu-latest
|
|
91
|
-
steps:
|
|
92
|
-
- name: Checkout
|
|
93
|
-
uses: actions/checkout@v2
|
|
94
|
-
- name: Setup PHP
|
|
95
|
-
uses: shivammathur/setup-php@v2
|
|
96
|
-
with:
|
|
97
|
-
php-version: '7.3'
|
|
98
|
-
extensions: mbstring, intl
|
|
99
|
-
tools: phpstan
|
|
100
|
-
- name: Get composer cache directory
|
|
101
|
-
id: composer-cache
|
|
102
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
103
|
-
- name: Cache composer dependencies
|
|
104
|
-
uses: actions/cache@v2
|
|
105
|
-
with:
|
|
106
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
107
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
108
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
109
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
110
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
111
|
-
- name: Install dependencies
|
|
112
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
113
|
-
- name: Static Analysis using PHPStan
|
|
114
|
-
run: phpstan analyse --no-progress src/
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
# GitHub Action for CakePHP with PostgreSQL and Redis
|
|
2
|
-
# Tested with https://github.com/cakephp/app
|
|
3
|
-
name: Testing CakePHP with PostgreSQL
|
|
4
|
-
on: [push, pull_request]
|
|
5
|
-
jobs:
|
|
6
|
-
tests:
|
|
7
|
-
strategy:
|
|
8
|
-
matrix:
|
|
9
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
services:
|
|
12
|
-
postgres:
|
|
13
|
-
image: postgres:10.8
|
|
14
|
-
env:
|
|
15
|
-
POSTGRES_USER: postgres
|
|
16
|
-
POSTGRES_PASSWORD: postgres
|
|
17
|
-
POSTGRES_DB: postgres
|
|
18
|
-
ports:
|
|
19
|
-
- 5432/tcp
|
|
20
|
-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
|
21
|
-
redis:
|
|
22
|
-
image: redis
|
|
23
|
-
ports:
|
|
24
|
-
- 6379/tcp
|
|
25
|
-
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
26
|
-
steps:
|
|
27
|
-
- name: Checkout
|
|
28
|
-
uses: actions/checkout@v2
|
|
29
|
-
- name: Setup PHP
|
|
30
|
-
uses: shivammathur/setup-php@v2
|
|
31
|
-
with:
|
|
32
|
-
php-version: ${{ matrix.php-versions }}
|
|
33
|
-
# You can also use ext-apcu or ext-memcached instead of ext-redis
|
|
34
|
-
# Install memcached if using ext-memcached
|
|
35
|
-
extensions: mbstring, intl, redis, pdo_pgsql
|
|
36
|
-
coverage: pcov
|
|
37
|
-
- name: Get composer cache directory
|
|
38
|
-
id: composer-cache
|
|
39
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
40
|
-
- name: Cache composer dependencies
|
|
41
|
-
uses: actions/cache@v2
|
|
42
|
-
with:
|
|
43
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
44
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
45
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
46
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
47
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
48
|
-
- name: Install dependencies
|
|
49
|
-
run: |
|
|
50
|
-
composer install --no-progress --prefer-dist --optimize-autoloader
|
|
51
|
-
composer run-script post-install-cmd --no-interaction
|
|
52
|
-
# Add a step to run migrations if required
|
|
53
|
-
- name: Test with phpunit
|
|
54
|
-
run: vendor/bin/phpunit --coverage-text
|
|
55
|
-
env:
|
|
56
|
-
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
|
57
|
-
DB_DSN: postgres://postgres@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/postgres
|
|
58
|
-
|
|
59
|
-
coding-standard:
|
|
60
|
-
name: Coding Standard
|
|
61
|
-
runs-on: ubuntu-latest
|
|
62
|
-
steps:
|
|
63
|
-
- name: Checkout
|
|
64
|
-
uses: actions/checkout@v2
|
|
65
|
-
- name: Setup PHP
|
|
66
|
-
uses: shivammathur/setup-php@v2
|
|
67
|
-
with:
|
|
68
|
-
php-version: '7.3'
|
|
69
|
-
extensions: mbstring, intl
|
|
70
|
-
- name: Get composer cache directory
|
|
71
|
-
id: composer-cache
|
|
72
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
73
|
-
- name: Cache composer dependencies
|
|
74
|
-
uses: actions/cache@v2
|
|
75
|
-
with:
|
|
76
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
77
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
78
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
79
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
80
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
81
|
-
- name: Install dependencies
|
|
82
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
83
|
-
- name: PHP CodeSniffer
|
|
84
|
-
run: composer cs-check
|
|
85
|
-
|
|
86
|
-
static-analysis:
|
|
87
|
-
name: Static Analysis
|
|
88
|
-
runs-on: ubuntu-latest
|
|
89
|
-
steps:
|
|
90
|
-
- name: Checkout
|
|
91
|
-
uses: actions/checkout@v2
|
|
92
|
-
- name: Setup PHP
|
|
93
|
-
uses: shivammathur/setup-php@v2
|
|
94
|
-
with:
|
|
95
|
-
php-version: '7.3'
|
|
96
|
-
extensions: mbstring, intl
|
|
97
|
-
tools: phpstan
|
|
98
|
-
- name: Get composer cache directory
|
|
99
|
-
id: composer-cache
|
|
100
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
101
|
-
- name: Cache composer dependencies
|
|
102
|
-
uses: actions/cache@v2
|
|
103
|
-
with:
|
|
104
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
105
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
106
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
107
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
108
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
109
|
-
- name: Install dependencies
|
|
110
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
111
|
-
- name: Static Analysis using PHPStan
|
|
112
|
-
run: phpstan analyse --no-progress src/
|
package/examples/cakephp.yml
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# GitHub Action for CakePHP
|
|
2
|
-
# Tested with https://github.com/cakephp/app
|
|
3
|
-
name: Testing CakePHP
|
|
4
|
-
on: [push, pull_request]
|
|
5
|
-
jobs:
|
|
6
|
-
tests:
|
|
7
|
-
strategy:
|
|
8
|
-
matrix:
|
|
9
|
-
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
10
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
11
|
-
runs-on: ${{ matrix.operating-system }}
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout
|
|
14
|
-
uses: actions/checkout@v2
|
|
15
|
-
- name: Setup PHP
|
|
16
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
17
|
-
with:
|
|
18
|
-
php-version: ${{ matrix.php-versions }}
|
|
19
|
-
extensions: mbstring, intl, pdo_sqlite, pdo_mysql
|
|
20
|
-
coverage: pcov #optional
|
|
21
|
-
- name: Get composer cache directory
|
|
22
|
-
id: composer-cache
|
|
23
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
24
|
-
- name: Cache composer dependencies
|
|
25
|
-
uses: actions/cache@v2
|
|
26
|
-
with:
|
|
27
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
28
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
29
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
30
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
31
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
32
|
-
- name: Install dependencies
|
|
33
|
-
run: |
|
|
34
|
-
composer install --no-progress --prefer-dist --optimize-autoloader
|
|
35
|
-
composer run-script post-install-cmd --no-interaction
|
|
36
|
-
- name: Test with phpunit
|
|
37
|
-
run: vendor/bin/phpunit --coverage-text
|
|
38
|
-
|
|
39
|
-
coding-standard:
|
|
40
|
-
name: Coding Standard
|
|
41
|
-
runs-on: ubuntu-latest
|
|
42
|
-
steps:
|
|
43
|
-
- name: Checkout
|
|
44
|
-
uses: actions/checkout@v2
|
|
45
|
-
- name: Setup PHP
|
|
46
|
-
uses: shivammathur/setup-php@v2
|
|
47
|
-
with:
|
|
48
|
-
php-version: '7.3'
|
|
49
|
-
extensions: mbstring, intl
|
|
50
|
-
- name: Get composer cache directory
|
|
51
|
-
id: composer-cache
|
|
52
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
53
|
-
- name: Cache composer dependencies
|
|
54
|
-
uses: actions/cache@v2
|
|
55
|
-
with:
|
|
56
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
57
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
58
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
59
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
60
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
61
|
-
- name: Install dependencies
|
|
62
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
63
|
-
- name: PHP CodeSniffer
|
|
64
|
-
run: composer cs-check
|
|
65
|
-
|
|
66
|
-
static-analysis:
|
|
67
|
-
name: Static Analysis
|
|
68
|
-
runs-on: ubuntu-latest
|
|
69
|
-
steps:
|
|
70
|
-
- name: Checkout
|
|
71
|
-
uses: actions/checkout@v2
|
|
72
|
-
- name: Setup PHP
|
|
73
|
-
uses: shivammathur/setup-php@v2
|
|
74
|
-
with:
|
|
75
|
-
php-version: '7.3'
|
|
76
|
-
extensions: mbstring, intl
|
|
77
|
-
tools: phpstan
|
|
78
|
-
- name: Get composer cache directory
|
|
79
|
-
id: composer-cache
|
|
80
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
81
|
-
- name: Cache composer dependencies
|
|
82
|
-
uses: actions/cache@v2
|
|
83
|
-
with:
|
|
84
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
85
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
86
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
87
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
88
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
89
|
-
- name: Install dependencies
|
|
90
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
91
|
-
- name: Static Analysis using PHPStan
|
|
92
|
-
run: phpstan analyse --no-progress src/
|
package/examples/codeigniter.yml
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# GitHub Action for CodeIgniter
|
|
2
|
-
name: Testing CodeIgniter
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
build:
|
|
6
|
-
strategy:
|
|
7
|
-
matrix:
|
|
8
|
-
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
9
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
10
|
-
runs-on: ${{ matrix.operating-system }}
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout
|
|
13
|
-
uses: actions/checkout@v2
|
|
14
|
-
- name: Setup PHP, with composer and extensions
|
|
15
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
16
|
-
with:
|
|
17
|
-
php-version: ${{ matrix.php-versions }}
|
|
18
|
-
extensions: mbstring, intl, curl, dom
|
|
19
|
-
coverage: xdebug #optional
|
|
20
|
-
- name: Get composer cache directory
|
|
21
|
-
id: composer-cache
|
|
22
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
23
|
-
- name: Cache composer dependencies
|
|
24
|
-
uses: actions/cache@v2
|
|
25
|
-
with:
|
|
26
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
27
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
28
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
29
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
30
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
31
|
-
- name: Install dependencies
|
|
32
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
33
|
-
- name: Test with phpunit
|
|
34
|
-
run: vendor/bin/phpunit --coverage-text
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Laravel with MySQL and Redis
|
|
2
|
-
name: Testing Laravel with MySQL
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
laravel:
|
|
6
|
-
name: Laravel (PHP ${{ matrix.php-versions }})
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
env:
|
|
9
|
-
DB_DATABASE: laravel
|
|
10
|
-
DB_USERNAME: root
|
|
11
|
-
DB_PASSWORD: password
|
|
12
|
-
BROADCAST_DRIVER: log
|
|
13
|
-
CACHE_DRIVER: redis
|
|
14
|
-
QUEUE_CONNECTION: redis
|
|
15
|
-
SESSION_DRIVER: redis
|
|
16
|
-
services:
|
|
17
|
-
mysql:
|
|
18
|
-
image: mysql:5.7
|
|
19
|
-
env:
|
|
20
|
-
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
|
21
|
-
MYSQL_ROOT_PASSWORD: password
|
|
22
|
-
MYSQL_DATABASE: laravel
|
|
23
|
-
ports:
|
|
24
|
-
- 3306/tcp
|
|
25
|
-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
26
|
-
redis:
|
|
27
|
-
image: redis
|
|
28
|
-
ports:
|
|
29
|
-
- 6379/tcp
|
|
30
|
-
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
31
|
-
strategy:
|
|
32
|
-
fail-fast: false
|
|
33
|
-
matrix:
|
|
34
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
35
|
-
steps:
|
|
36
|
-
- name: Checkout
|
|
37
|
-
uses: actions/checkout@v2
|
|
38
|
-
- name: Setup PHP, with composer and extensions
|
|
39
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
40
|
-
with:
|
|
41
|
-
php-version: ${{ matrix.php-versions }}
|
|
42
|
-
extensions: mbstring, dom, fileinfo, mysql
|
|
43
|
-
coverage: xdebug #optional
|
|
44
|
-
- name: Start mysql service
|
|
45
|
-
run: sudo /etc/init.d/mysql start
|
|
46
|
-
- name: Get composer cache directory
|
|
47
|
-
id: composer-cache
|
|
48
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
49
|
-
- name: Cache composer dependencies
|
|
50
|
-
uses: actions/cache@v2
|
|
51
|
-
with:
|
|
52
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
53
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
54
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
55
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
56
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
57
|
-
- name: Install Composer dependencies
|
|
58
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
59
|
-
- name: Prepare the application
|
|
60
|
-
run: |
|
|
61
|
-
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
62
|
-
php artisan key:generate
|
|
63
|
-
- name: Clear Config
|
|
64
|
-
run: php artisan config:clear
|
|
65
|
-
- name: Run Migration
|
|
66
|
-
run: php artisan migrate -v
|
|
67
|
-
env:
|
|
68
|
-
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
|
69
|
-
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
|
70
|
-
- name: Test with phpunit
|
|
71
|
-
run: vendor/bin/phpunit --coverage-text
|
|
72
|
-
env:
|
|
73
|
-
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
|
74
|
-
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Laravel with PostgreSQL and Redis
|
|
2
|
-
name: Testing Laravel with PostgreSQL
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
laravel:
|
|
6
|
-
name: Laravel (PHP ${{ matrix.php-versions }})
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
env:
|
|
9
|
-
BROADCAST_DRIVER: log
|
|
10
|
-
CACHE_DRIVER: redis
|
|
11
|
-
QUEUE_CONNECTION: redis
|
|
12
|
-
SESSION_DRIVER: redis
|
|
13
|
-
DB_CONNECTION: pgsql
|
|
14
|
-
DB_HOST: localhost
|
|
15
|
-
DB_PASSWORD: postgres
|
|
16
|
-
DB_USERNAME: postgres
|
|
17
|
-
DB_DATABASE: postgres
|
|
18
|
-
services:
|
|
19
|
-
postgres:
|
|
20
|
-
image: postgres:10.8
|
|
21
|
-
env:
|
|
22
|
-
POSTGRES_USER: postgres
|
|
23
|
-
POSTGRES_PASSWORD: postgres
|
|
24
|
-
POSTGRES_DB: postgres
|
|
25
|
-
ports:
|
|
26
|
-
- 5432/tcp
|
|
27
|
-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
|
28
|
-
redis:
|
|
29
|
-
image: redis
|
|
30
|
-
ports:
|
|
31
|
-
- 6379/tcp
|
|
32
|
-
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
33
|
-
strategy:
|
|
34
|
-
fail-fast: false
|
|
35
|
-
matrix:
|
|
36
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
37
|
-
steps:
|
|
38
|
-
- name: Checkout
|
|
39
|
-
uses: actions/checkout@v2
|
|
40
|
-
- name: Setup PHP, with composer and extensions
|
|
41
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
42
|
-
with:
|
|
43
|
-
php-version: ${{ matrix.php-versions }}
|
|
44
|
-
extensions: mbstring, dom, fileinfo, pgsql
|
|
45
|
-
coverage: xdebug #optional
|
|
46
|
-
- name: Get composer cache directory
|
|
47
|
-
id: composer-cache
|
|
48
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
49
|
-
- name: Cache composer dependencies
|
|
50
|
-
uses: actions/cache@v2
|
|
51
|
-
with:
|
|
52
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
53
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
54
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
55
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
56
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
57
|
-
- name: Install Composer dependencies
|
|
58
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
59
|
-
- name: Prepare the application
|
|
60
|
-
run: |
|
|
61
|
-
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
62
|
-
php artisan key:generate
|
|
63
|
-
- name: Clear Config
|
|
64
|
-
run: php artisan config:clear
|
|
65
|
-
- name: Run Migration
|
|
66
|
-
run: php artisan migrate -v
|
|
67
|
-
env:
|
|
68
|
-
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
|
69
|
-
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
|
70
|
-
- name: Test with phpunit
|
|
71
|
-
run: vendor/bin/phpunit --coverage-text
|
|
72
|
-
env:
|
|
73
|
-
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
|
74
|
-
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
package/examples/laravel.yml
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Laravel
|
|
2
|
-
name: Testing Laravel
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
laravel:
|
|
6
|
-
name: Laravel (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
|
|
7
|
-
runs-on: ${{ matrix.operating-system }}
|
|
8
|
-
strategy:
|
|
9
|
-
fail-fast: false
|
|
10
|
-
matrix:
|
|
11
|
-
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
12
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout
|
|
15
|
-
uses: actions/checkout@v2
|
|
16
|
-
- name: Setup PHP, with composer and extensions
|
|
17
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
18
|
-
with:
|
|
19
|
-
php-version: ${{ matrix.php-versions }}
|
|
20
|
-
extensions: mbstring, dom, fileinfo
|
|
21
|
-
coverage: xdebug #optional
|
|
22
|
-
- name: Get composer cache directory
|
|
23
|
-
id: composer-cache
|
|
24
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
25
|
-
- name: Cache composer dependencies
|
|
26
|
-
uses: actions/cache@v2
|
|
27
|
-
with:
|
|
28
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
29
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
30
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
31
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
32
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
33
|
-
- name: Install Composer dependencies
|
|
34
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
35
|
-
- name: Prepare the application
|
|
36
|
-
run: |
|
|
37
|
-
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
38
|
-
php artisan key:generate
|
|
39
|
-
- name: Clear Config
|
|
40
|
-
run: php artisan config:clear
|
|
41
|
-
- name: Test with phpunit
|
|
42
|
-
run: vendor/bin/phpunit --coverage-text
|