setup-php 2.13.0 → 2.17.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 +990 -922
- package/lib/config.d.ts +3 -0
- package/lib/config.js +71 -71
- package/lib/config.js.map +1 -1
- package/lib/coverage.d.ts +5 -0
- package/lib/coverage.js +97 -87
- package/lib/coverage.js.map +1 -1
- package/lib/extensions.d.ts +4 -0
- package/lib/extensions.js +214 -200
- package/lib/extensions.js.map +1 -1
- package/lib/fetch.d.ts +1 -0
- package/lib/fetch.js +63 -0
- package/lib/fetch.js.map +1 -0
- package/lib/install.d.ts +2 -0
- package/lib/install.js +75 -81
- package/lib/install.js.map +1 -1
- package/lib/tools.d.ts +23 -0
- package/lib/tools.js +367 -386
- package/lib/tools.js.map +1 -1
- package/lib/utils.d.ts +21 -0
- package/lib/utils.js +261 -291
- package/lib/utils.js.map +1 -1
- package/package.json +67 -56
- package/src/config.ts +82 -82
- package/src/configs/brew_extensions +31 -0
- package/src/configs/composer.env +2 -0
- package/src/configs/ini/jit.ini +3 -0
- package/src/configs/ini/php.ini +2 -0
- package/src/configs/ini/xdebug.ini +1 -0
- package/src/configs/os_releases.csv +19 -17
- package/src/configs/php-versions.json +6 -5
- package/src/configs/php_packages +12 -0
- 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 +278 -235
- package/src/configs/tools_schema.json +125 -114
- package/src/coverage.ts +144 -142
- package/src/extensions.ts +367 -349
- package/src/fetch.ts +54 -0
- package/src/install.ts +66 -82
- package/src/scripts/darwin.sh +285 -249
- package/src/scripts/extensions/add_extensions.ps1 +194 -0
- package/src/scripts/extensions/add_extensions.sh +184 -0
- package/src/scripts/{ext → extensions}/blackfire.ps1 +32 -32
- package/src/scripts/{ext → extensions}/blackfire.sh +22 -21
- package/src/scripts/{ext → extensions}/couchbase.sh +43 -43
- package/src/scripts/{ext → extensions}/cubrid.sh +60 -60
- package/src/scripts/extensions/extension_map.php +132 -0
- package/src/scripts/{ext → extensions}/firebird.ps1 +19 -19
- package/src/scripts/{ext → extensions}/firebird.sh +39 -35
- package/src/scripts/{ext → extensions}/gearman.sh +22 -22
- package/src/scripts/{ext → extensions}/geos.sh +17 -17
- package/src/scripts/{ext → extensions}/http.ps1 +54 -54
- package/src/scripts/{ext → extensions}/http.sh +109 -120
- package/src/scripts/{ext → extensions}/intl.sh +23 -23
- package/src/scripts/{ext → extensions}/ioncube.ps1 +33 -32
- package/src/scripts/{ext → extensions}/ioncube.sh +21 -19
- package/src/scripts/{ext → extensions}/oci.ps1 +85 -60
- package/src/scripts/{ext → extensions}/oci.sh +65 -63
- package/src/scripts/{ext → extensions}/patches/firebird.sh +11 -11
- package/src/scripts/{ext → extensions}/patches/geos.sh +7 -7
- package/src/scripts/{ext → extensions}/patches/http.sh +11 -11
- package/src/scripts/{ext → extensions}/patches/pdo_oci.sh +6 -6
- package/src/scripts/{ext → extensions}/patches/phpize.sh +26 -26
- package/src/scripts/{ext → extensions}/patches/protobuf.sh +4 -4
- package/src/scripts/{ext → extensions}/phalcon.ps1 +54 -54
- package/src/scripts/{ext → extensions}/phalcon.sh +58 -58
- package/src/scripts/{ext → extensions}/source.sh +145 -144
- package/src/scripts/extensions/sqlsrv.sh +15 -0
- package/src/scripts/linux.sh +269 -256
- package/src/scripts/tools/add_tools.ps1 +239 -26
- package/src/scripts/tools/add_tools.sh +175 -20
- package/src/scripts/tools/blackfire.ps1 +19 -19
- package/src/scripts/tools/blackfire.sh +40 -39
- package/src/scripts/tools/grpc_php_plugin.ps1 +21 -21
- package/src/scripts/tools/grpc_php_plugin.sh +58 -58
- package/src/scripts/tools/ppa.sh +192 -151
- package/src/scripts/tools/protoc.ps1 +38 -38
- package/src/scripts/tools/protoc.sh +28 -28
- package/src/scripts/tools/symfony.ps1 +14 -0
- package/src/scripts/tools/symfony.sh +13 -0
- package/src/scripts/unix.sh +186 -0
- package/src/scripts/win32.ps1 +352 -494
- package/src/tools.ts +512 -538
- package/src/utils.ts +415 -500
- 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 -263
- package/__tests__/install.test.ts +0 -175
- package/__tests__/tools.test.ts +0 -524
- package/__tests__/utils.test.ts +0 -307
- package/action.yml +0 -29
- package/dist/index.js +0 -3051
- 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/sapi.js +0 -64
- package/src/scripts/common.sh +0 -314
- package/tsconfig.json +0 -18
package/examples/lumen-mysql.yml
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Lumen with MySQL and Redis
|
|
2
|
-
name: Testing Lumen with MySQL
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
lumen:
|
|
6
|
-
name: Lumen (PHP ${{ matrix.php-versions }})
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
env:
|
|
9
|
-
DB_DATABASE: lumen
|
|
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: lumen
|
|
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: |
|
|
59
|
-
composer install --no-progress --prefer-dist --optimize-autoloader
|
|
60
|
-
composer require predis/predis illuminate/redis
|
|
61
|
-
- name: Prepare the application
|
|
62
|
-
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
63
|
-
- name: Register Redis as service provider
|
|
64
|
-
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
|
|
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 Lumen with PostgreSQL and Redis
|
|
2
|
-
name: Testing Lumen with PostgreSQL
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
laravel:
|
|
6
|
-
name: Lumen (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: |
|
|
59
|
-
composer install --no-progress --prefer-dist --optimize-autoloader
|
|
60
|
-
composer require predis/predis illuminate/redis
|
|
61
|
-
- name: Prepare the application
|
|
62
|
-
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
63
|
-
- name: Register Redis as service provider
|
|
64
|
-
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
|
|
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/lumen.yml
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Lumen
|
|
2
|
-
name: Unit Testing Lumen
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
lumen:
|
|
6
|
-
name: Lumen (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, mysql
|
|
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: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
37
|
-
- name: Test with phpunit
|
|
38
|
-
run: vendor/bin/phpunit --coverage-text
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Phalcon with MySQL
|
|
2
|
-
## Notes
|
|
3
|
-
## Make sure you have .env.example or .env file in your project
|
|
4
|
-
## and you have loaded Dotenv (https://github.com/vlucas/phpdotenv)
|
|
5
|
-
name: Testing Phalcon with MySQL
|
|
6
|
-
on: [push, pull_request]
|
|
7
|
-
jobs:
|
|
8
|
-
phalcon:
|
|
9
|
-
name: Phalcon (PHP ${{ matrix.php-versions }})
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
env:
|
|
12
|
-
DB_ADAPTER: mysql
|
|
13
|
-
DB_HOST: 127.0.0.1
|
|
14
|
-
DB_NAME: phalcon
|
|
15
|
-
DB_USERNAME: root
|
|
16
|
-
DB_PASSWORD: password
|
|
17
|
-
CODECEPTION_URL: 127.0.0.1
|
|
18
|
-
CODECEPTION_PORT: 8888
|
|
19
|
-
services:
|
|
20
|
-
mysql:
|
|
21
|
-
image: mysql:5.7
|
|
22
|
-
env:
|
|
23
|
-
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
|
24
|
-
MYSQL_ROOT_PASSWORD: password
|
|
25
|
-
MYSQL_DATABASE: phalcon
|
|
26
|
-
ports:
|
|
27
|
-
- 3306/tcp
|
|
28
|
-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
29
|
-
strategy:
|
|
30
|
-
fail-fast: false
|
|
31
|
-
matrix:
|
|
32
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
33
|
-
# For phalcon 3.x, use
|
|
34
|
-
# php-versions: ['7.0', '7.1', '7.2', '7.3']
|
|
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, zip, phalcon4, mysql #use phalcon3 for the phalcon 3.x.
|
|
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: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
61
|
-
- name: Run Migration
|
|
62
|
-
run: |
|
|
63
|
-
if [ ! -e phinx.yml ]; then vendor/bin/phinx init; fi
|
|
64
|
-
vendor/bin/phinx migrate
|
|
65
|
-
vendor/bin/phinx seed:run
|
|
66
|
-
env:
|
|
67
|
-
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
|
68
|
-
- name: Run Tests
|
|
69
|
-
run: |
|
|
70
|
-
(cd public && nohup php -S $CODECEPTION_URL:$CODECEPTION_PORT > phalcon.log 2>&1 &)
|
|
71
|
-
vendor/bin/codecept build
|
|
72
|
-
vendor/bin/codecept run
|
|
73
|
-
env:
|
|
74
|
-
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Phalcon with PostgreSQL
|
|
2
|
-
## Notes
|
|
3
|
-
## Make sure you have .env.example or .env file in your project
|
|
4
|
-
## and you have loaded Dotenv (https://github.com/vlucas/phpdotenv)
|
|
5
|
-
name: Testing Phalcon with PostgreSQL
|
|
6
|
-
on: [push, pull_request]
|
|
7
|
-
jobs:
|
|
8
|
-
phalcon:
|
|
9
|
-
name: Phalcon (PHP ${{ matrix.php-versions }})
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
env:
|
|
12
|
-
DB_ADAPTER: pgsql
|
|
13
|
-
DB_HOST: 127.0.0.1
|
|
14
|
-
DB_NAME: postgres
|
|
15
|
-
DB_USERNAME: postgres
|
|
16
|
-
DB_PASSWORD: postgres
|
|
17
|
-
CODECEPTION_URL: 127.0.0.1
|
|
18
|
-
CODECEPTION_PORT: 8888
|
|
19
|
-
DB_CONNECTION: pgsql
|
|
20
|
-
services:
|
|
21
|
-
postgres:
|
|
22
|
-
image: postgres:10.8
|
|
23
|
-
env:
|
|
24
|
-
POSTGRES_USER: postgres
|
|
25
|
-
POSTGRES_PASSWORD: postgres
|
|
26
|
-
POSTGRES_DB: postgres
|
|
27
|
-
ports:
|
|
28
|
-
- 5432/tcp
|
|
29
|
-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
|
30
|
-
strategy:
|
|
31
|
-
fail-fast: false
|
|
32
|
-
matrix:
|
|
33
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
34
|
-
# For phalcon 3.x, use
|
|
35
|
-
# php-versions: ['7.0', '7.1', '7.2', '7.3']
|
|
36
|
-
steps:
|
|
37
|
-
- name: Checkout
|
|
38
|
-
uses: actions/checkout@v2
|
|
39
|
-
- name: Setup PHP, with composer and extensions
|
|
40
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
41
|
-
with:
|
|
42
|
-
php-version: ${{ matrix.php-versions }}
|
|
43
|
-
extensions: mbstring, dom, zip, phalcon4, pgsql #use phalcon3 for the phalcon 3.x
|
|
44
|
-
coverage: xdebug #optional
|
|
45
|
-
- name: Get composer cache directory
|
|
46
|
-
id: composer-cache
|
|
47
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
48
|
-
- name: Cache composer dependencies
|
|
49
|
-
uses: actions/cache@v2
|
|
50
|
-
with:
|
|
51
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
52
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
53
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
54
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
55
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
56
|
-
- name: Install Composer dependencies
|
|
57
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
58
|
-
- name: Prepare the application
|
|
59
|
-
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
60
|
-
- name: Run Migration
|
|
61
|
-
run: |
|
|
62
|
-
if [ ! -e phinx.yml ]; then vendor/bin/phinx init; fi
|
|
63
|
-
vendor/bin/phinx migrate
|
|
64
|
-
vendor/bin/phinx seed:run
|
|
65
|
-
env:
|
|
66
|
-
DB_PORT: ${{ job.services.postgres.ports['5432'] }}
|
|
67
|
-
- name: Run Tests
|
|
68
|
-
run: |
|
|
69
|
-
(cd public && nohup php -S $CODECEPTION_URL:$CODECEPTION_PORT > phalcon.log 2>&1 &)
|
|
70
|
-
vendor/bin/codecept build
|
|
71
|
-
vendor/bin/codecept run
|
|
72
|
-
env:
|
|
73
|
-
DB_PORT: ${{ job.services.postgres.ports['5432'] }}
|
package/examples/sage.yml
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# GitHub Action for roots/sage
|
|
2
|
-
name: Testing Sage
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
sage:
|
|
6
|
-
name: Sage (PHP ${{ matrix.php-versions }} & Node ${{ matrix.node-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
|
-
node-versions: ['8', '10']
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout
|
|
15
|
-
uses: actions/checkout@v2
|
|
16
|
-
- name: Setup Node.js
|
|
17
|
-
uses: actions/setup-node@v1
|
|
18
|
-
with:
|
|
19
|
-
node-version: ${{ matrix.node-versions }}
|
|
20
|
-
- name: Setup PHP, with composer and extensions
|
|
21
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
22
|
-
with:
|
|
23
|
-
php-version: ${{ matrix.php-versions }}
|
|
24
|
-
extensions: mbstring
|
|
25
|
-
- name: Check node versions
|
|
26
|
-
run: node -v
|
|
27
|
-
- name: Get yarn cache
|
|
28
|
-
id: yarn-cache
|
|
29
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
30
|
-
- uses: actions/cache@v2
|
|
31
|
-
with:
|
|
32
|
-
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
33
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
34
|
-
restore-keys: ${{ runner.os }}-yarn-
|
|
35
|
-
- name: Get composer cache directory
|
|
36
|
-
id: composer-cache
|
|
37
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
38
|
-
- name: Cache composer dependencies
|
|
39
|
-
uses: actions/cache@v2
|
|
40
|
-
with:
|
|
41
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
42
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
43
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
44
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
45
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
46
|
-
- name: Install yarn dependencies
|
|
47
|
-
run: yarn -V
|
|
48
|
-
- name: Install Composer dependencies
|
|
49
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
50
|
-
- name: Yarn test and build
|
|
51
|
-
run: |
|
|
52
|
-
yarn run test
|
|
53
|
-
yarn run build
|
|
54
|
-
yarn run rmdist
|
|
55
|
-
yarn run "build:production"
|
|
56
|
-
- name: PHP test
|
|
57
|
-
run: composer test
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Slim Framework
|
|
2
|
-
name: Testing Slim Framework
|
|
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, simplexml, 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,57 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Symfony with MySQL
|
|
2
|
-
name: Testing Symfony with MySQL
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
symfony:
|
|
6
|
-
name: Symfony (PHP ${{ matrix.php-versions }})
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
services:
|
|
9
|
-
mysql:
|
|
10
|
-
image: mysql:5.7
|
|
11
|
-
env:
|
|
12
|
-
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
|
13
|
-
MYSQL_ROOT_PASSWORD: symfony
|
|
14
|
-
MYSQL_DATABASE: symfony
|
|
15
|
-
ports:
|
|
16
|
-
- 3306/tcp
|
|
17
|
-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
18
|
-
strategy:
|
|
19
|
-
fail-fast: false
|
|
20
|
-
matrix:
|
|
21
|
-
php-versions: ['7.3', '7.4']
|
|
22
|
-
steps:
|
|
23
|
-
- name: Checkout
|
|
24
|
-
uses: actions/checkout@v2
|
|
25
|
-
- name: Setup PHP, with composer and extensions
|
|
26
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
27
|
-
with:
|
|
28
|
-
php-version: ${{ matrix.php-versions }}
|
|
29
|
-
tools: phpunit-bridge
|
|
30
|
-
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
|
|
31
|
-
coverage: xdebug #optional
|
|
32
|
-
- name: Start mysql service
|
|
33
|
-
run: sudo /etc/init.d/mysql start
|
|
34
|
-
- name: Get composer cache directory
|
|
35
|
-
id: composer-cache
|
|
36
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
37
|
-
- name: Cache composer dependencies
|
|
38
|
-
uses: actions/cache@v2
|
|
39
|
-
with:
|
|
40
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
41
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
42
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
43
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
44
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
45
|
-
- name: Install Composer dependencies
|
|
46
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
47
|
-
- name: Run Migration
|
|
48
|
-
run: |
|
|
49
|
-
composer require --dev symfony/orm-pack
|
|
50
|
-
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
|
|
51
|
-
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
|
52
|
-
env:
|
|
53
|
-
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
|
|
54
|
-
- name: Install PHPUnit
|
|
55
|
-
run: simple-phpunit install
|
|
56
|
-
- name: Run tests
|
|
57
|
-
run: simple-phpunit --coverage-text
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Symfony with PostgreSQL
|
|
2
|
-
name: Testing Symfony with PostgreSQL
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
symfony:
|
|
6
|
-
name: Symfony (PHP ${{ matrix.php-versions }})
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
services:
|
|
9
|
-
postgres:
|
|
10
|
-
image: postgres:10.8
|
|
11
|
-
env:
|
|
12
|
-
POSTGRES_USER: postgres
|
|
13
|
-
POSTGRES_PASSWORD: postgres
|
|
14
|
-
POSTGRES_DB: postgres
|
|
15
|
-
ports:
|
|
16
|
-
- 5432/tcp
|
|
17
|
-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
|
18
|
-
strategy:
|
|
19
|
-
fail-fast: false
|
|
20
|
-
matrix:
|
|
21
|
-
php-versions: ['7.3', '7.4']
|
|
22
|
-
steps:
|
|
23
|
-
- name: Checkout
|
|
24
|
-
uses: actions/checkout@v2
|
|
25
|
-
- name: Setup PHP, with composer and extensions
|
|
26
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
27
|
-
with:
|
|
28
|
-
php-version: ${{ matrix.php-versions }}
|
|
29
|
-
tools: phpunit-bridge
|
|
30
|
-
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
|
|
31
|
-
coverage: xdebug #optional
|
|
32
|
-
- name: Get composer cache directory
|
|
33
|
-
id: composer-cache
|
|
34
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
35
|
-
- name: Cache composer dependencies
|
|
36
|
-
uses: actions/cache@v2
|
|
37
|
-
with:
|
|
38
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
39
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
40
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
41
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
42
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
43
|
-
- name: Install Composer dependencies
|
|
44
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
45
|
-
- name: Run Migration
|
|
46
|
-
run: |
|
|
47
|
-
composer require --dev symfony/orm-pack
|
|
48
|
-
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
|
|
49
|
-
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
|
50
|
-
env:
|
|
51
|
-
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
|
|
52
|
-
- name: Install PHPUnit
|
|
53
|
-
run: simple-phpunit install
|
|
54
|
-
- name: Run tests
|
|
55
|
-
run: simple-phpunit --coverage-text
|
package/examples/symfony.yml
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Symfony
|
|
2
|
-
name: Testing Symfony
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
symfony:
|
|
6
|
-
name: Symfony (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.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
|
-
tools: phpunit-bridge
|
|
21
|
-
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
|
|
22
|
-
coverage: xdebug #optional
|
|
23
|
-
- name: Get composer cache directory
|
|
24
|
-
id: composer-cache
|
|
25
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
26
|
-
- name: Cache composer dependencies
|
|
27
|
-
uses: actions/cache@v2
|
|
28
|
-
with:
|
|
29
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
30
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
31
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
32
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
33
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
34
|
-
- name: Install Composer dependencies
|
|
35
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
36
|
-
- name: Install PHPUnit
|
|
37
|
-
run: simple-phpunit install
|
|
38
|
-
- name: Run tests
|
|
39
|
-
run: simple-phpunit --coverage-text
|
package/examples/yii2-mysql.yml
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# GitHub Action for Yii Framework with MySQL
|
|
2
|
-
name: Testing Yii2 with MySQL
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
jobs:
|
|
5
|
-
yii:
|
|
6
|
-
name: Yii2 (PHP ${{ matrix.php-versions }})
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
env:
|
|
9
|
-
DB_USERNAME: root
|
|
10
|
-
DB_PASSWORD: yii
|
|
11
|
-
TEST_DB_USERNAME: root
|
|
12
|
-
TEST_DB_PASSWORD: yii
|
|
13
|
-
DB_CHARSET: utf8
|
|
14
|
-
services:
|
|
15
|
-
mysql:
|
|
16
|
-
image: mysql:5.7
|
|
17
|
-
env:
|
|
18
|
-
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
|
19
|
-
MYSQL_ROOT_PASSWORD: yii
|
|
20
|
-
MYSQL_DATABASE: yii
|
|
21
|
-
ports:
|
|
22
|
-
- 3306/tcp
|
|
23
|
-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
24
|
-
strategy:
|
|
25
|
-
fail-fast: false
|
|
26
|
-
matrix:
|
|
27
|
-
php-versions: ['7.2', '7.3', '7.4']
|
|
28
|
-
steps:
|
|
29
|
-
- name: Checkout
|
|
30
|
-
uses: actions/checkout@v2
|
|
31
|
-
- name: Set Node.js 10.x
|
|
32
|
-
uses: actions/setup-node@v1
|
|
33
|
-
with:
|
|
34
|
-
node-version: 10.x
|
|
35
|
-
- name: Setup PHP, with composer and extensions
|
|
36
|
-
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
|
37
|
-
with:
|
|
38
|
-
php-version: ${{ matrix.php-versions }}
|
|
39
|
-
extensions: mbstring, intl, gd, imagick, zip, dom, mysql
|
|
40
|
-
coverage: xdebug #optional
|
|
41
|
-
- name: Start mysql service
|
|
42
|
-
run: sudo /etc/init.d/mysql start
|
|
43
|
-
- name: Get composer cache directory
|
|
44
|
-
id: composer-cache
|
|
45
|
-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
46
|
-
- name: Cache composer dependencies
|
|
47
|
-
uses: actions/cache@v2
|
|
48
|
-
with:
|
|
49
|
-
path: ${{ steps.composer-cache.outputs.dir }}
|
|
50
|
-
# Use composer.json for key, if composer.lock is not committed.
|
|
51
|
-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
|
52
|
-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
53
|
-
restore-keys: ${{ runner.os }}-composer-
|
|
54
|
-
- name: Install Composer dependencies
|
|
55
|
-
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
56
|
-
- name: Prepare the application
|
|
57
|
-
run: |
|
|
58
|
-
php -r "file_exists('.env') || copy('.env.dist', '.env');"
|
|
59
|
-
php console/yii app/setup
|
|
60
|
-
npm install --development
|
|
61
|
-
npm run build
|
|
62
|
-
env:
|
|
63
|
-
DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
|
64
|
-
TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
|
65
|
-
- name: Run Tests
|
|
66
|
-
run: |
|
|
67
|
-
vendor/bin/codecept build
|
|
68
|
-
php tests/bin/yii app/setup --interactive=0
|
|
69
|
-
nohup php -S localhost:8080 > yii.log 2>&1 &
|
|
70
|
-
vendor/bin/codecept run
|
|
71
|
-
env:
|
|
72
|
-
DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
|
73
|
-
TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|