setup-php 1.11.2 → 1.11.6

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.
Files changed (80) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +433 -458
  3. package/lib/config.d.ts +3 -0
  4. package/lib/config.js +71 -71
  5. package/lib/config.js.map +1 -1
  6. package/lib/coverage.d.ts +4 -0
  7. package/lib/coverage.js +97 -87
  8. package/lib/coverage.js.map +1 -1
  9. package/lib/extensions.d.ts +4 -0
  10. package/lib/extensions.js +188 -200
  11. package/lib/extensions.js.map +1 -1
  12. package/lib/install.d.ts +2 -0
  13. package/lib/install.js +96 -81
  14. package/lib/install.js.map +1 -1
  15. package/lib/tools.d.ts +18 -0
  16. package/lib/tools.js +306 -386
  17. package/lib/tools.js.map +1 -1
  18. package/lib/utils.d.ts +15 -0
  19. package/lib/utils.js +205 -291
  20. package/lib/utils.js.map +1 -1
  21. package/package.json +66 -56
  22. package/src/config.ts +82 -82
  23. package/src/configs/brew_extensions +28 -0
  24. package/src/configs/php-versions.json +5 -5
  25. package/src/configs/phpunit.json +24 -24
  26. package/src/coverage.ts +146 -146
  27. package/src/extensions.ts +235 -233
  28. package/src/install.ts +104 -104
  29. package/src/scripts/darwin.sh +341 -339
  30. package/src/scripts/ext/gearman.sh +22 -22
  31. package/src/scripts/ext/phalcon.ps1 +55 -55
  32. package/src/scripts/ext/phalcon.sh +70 -70
  33. package/src/scripts/linux.sh +361 -361
  34. package/src/scripts/win32.ps1 +326 -333
  35. package/src/tools.ts +472 -469
  36. package/src/utils.ts +319 -316
  37. package/.eslintrc.json +0 -16
  38. package/.github/CODE_OF_CONDUCT.md +0 -76
  39. package/.github/CONTRIBUTING.md +0 -69
  40. package/.github/FUNDING.yml +0 -7
  41. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -23
  42. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  43. package/.github/PULL_REQUEST_TEMPLATE.md +0 -38
  44. package/.github/SECURITY.md +0 -29
  45. package/.github/workflows/main-workflow.yml +0 -56
  46. package/.github/workflows/node-workflow.yml +0 -47
  47. package/.idea/workspace.xml +0 -113
  48. package/.prettierrc.json +0 -12
  49. package/__tests__/config.test.ts +0 -52
  50. package/__tests__/coverage.test.ts +0 -110
  51. package/__tests__/extensions.test.ts +0 -120
  52. package/__tests__/install.test.ts +0 -181
  53. package/__tests__/tools.test.ts +0 -476
  54. package/__tests__/utils.test.ts +0 -213
  55. package/action.yml +0 -38
  56. package/dist/index.js +0 -2854
  57. package/examples/bedrock.yml +0 -32
  58. package/examples/cakephp-mysql.yml +0 -114
  59. package/examples/cakephp-postgres.yml +0 -112
  60. package/examples/cakephp.yml +0 -92
  61. package/examples/codeigniter.yml +0 -34
  62. package/examples/laravel-mysql.yml +0 -74
  63. package/examples/laravel-postgres.yml +0 -74
  64. package/examples/laravel.yml +0 -42
  65. package/examples/lumen-mysql.yml +0 -74
  66. package/examples/lumen-postgres.yml +0 -74
  67. package/examples/lumen.yml +0 -38
  68. package/examples/phalcon-mysql.yml +0 -74
  69. package/examples/phalcon-postgres.yml +0 -73
  70. package/examples/sage.yml +0 -57
  71. package/examples/slim-framework.yml +0 -34
  72. package/examples/symfony-mysql.yml +0 -56
  73. package/examples/symfony-postgres.yml +0 -54
  74. package/examples/symfony.yml +0 -39
  75. package/examples/yii2-mysql.yml +0 -73
  76. package/examples/yii2-postgres.yml +0 -71
  77. package/examples/zend-framework.yml +0 -36
  78. package/jest.config.js +0 -12
  79. package/lib/sapi.js +0 -64
  80. package/tsconfig.json +0 -18
@@ -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@v1 #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'] }}
@@ -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@v1 #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@v1 #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@v1 #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@v1 #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@v1 #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,56 +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
- extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
30
- coverage: xdebug #optional
31
- - name: Start mysql service
32
- run: sudo /etc/init.d/mysql start
33
- - name: Get composer cache directory
34
- id: composer-cache
35
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
36
- - name: Cache composer dependencies
37
- uses: actions/cache@v2
38
- with:
39
- path: ${{ steps.composer-cache.outputs.dir }}
40
- # Use composer.json for key, if composer.lock is not committed.
41
- # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
42
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
43
- restore-keys: ${{ runner.os }}-composer-
44
- - name: Install Composer dependencies
45
- run: |
46
- composer require --dev symfony/orm-pack symfony/phpunit-bridge
47
- composer install --no-progress --prefer-dist --optimize-autoloader
48
- php bin/phpunit install
49
- - name: Run Migration
50
- run: |
51
- php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
52
- php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
53
- env:
54
- DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
55
- - name: Run Tests
56
- run: php bin/phpunit --coverage-text
@@ -1,54 +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
- extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
30
- coverage: xdebug #optional
31
- - name: Get composer cache directory
32
- id: composer-cache
33
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
34
- - name: Cache composer dependencies
35
- uses: actions/cache@v2
36
- with:
37
- path: ${{ steps.composer-cache.outputs.dir }}
38
- # Use composer.json for key, if composer.lock is not committed.
39
- # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
40
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
41
- restore-keys: ${{ runner.os }}-composer-
42
- - name: Install Composer dependencies
43
- run: |
44
- composer require --dev symfony/orm-pack symfony/phpunit-bridge
45
- composer install --no-progress --prefer-dist --optimize-autoloader
46
- php bin/phpunit install
47
- - name: Run Migration
48
- run: |
49
- php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
50
- php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
51
- env:
52
- DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
53
- - name: Run Tests
54
- run: php bin/phpunit --coverage-text
@@ -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
- extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
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: |
35
- composer require --dev symfony/phpunit-bridge
36
- composer install --no-progress --prefer-dist --optimize-autoloader
37
- php bin/phpunit install
38
- - name: Run Tests
39
- run: php bin/phpunit --coverage-text
@@ -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@v1 #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
@@ -1,71 +0,0 @@
1
- # GitHub Action for Yii Framework with PostgreSQL
2
- name: Testing Yii2 with PostgreSQL
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: postgres
10
- DB_PASSWORD: postgres
11
- TEST_DB_USERNAME: postgres
12
- TEST_DB_PASSWORD: postgres
13
- DB_CHARSET: utf8
14
- services:
15
- postgres:
16
- image: postgres:10.8
17
- env:
18
- POSTGRES_USER: postgres
19
- POSTGRES_PASSWORD: postgres
20
- POSTGRES_DB: postgres
21
- ports:
22
- - 5432/tcp
23
- options: --health-cmd pg_isready --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@v1 #https://github.com/shivammathur/setup-php
37
- with:
38
- php-version: ${{ matrix.php-versions }}
39
- extensions: mbstring, intl, gd, imagick, zip, dom, pgsql
40
- coverage: xdebug #optional
41
- - name: Get composer cache directory
42
- id: composer-cache
43
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
44
- - name: Cache composer dependencies
45
- uses: actions/cache@v2
46
- with:
47
- path: ${{ steps.composer-cache.outputs.dir }}
48
- # Use composer.json for key, if composer.lock is not committed.
49
- # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
50
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
51
- restore-keys: ${{ runner.os }}-composer-
52
- - name: Install Composer dependencies
53
- run: composer install --no-progress --prefer-dist --optimize-autoloader
54
- - name: Prepare the application
55
- run: |
56
- php -r "file_exists('.env') || copy('.env.dist', '.env');"
57
- php console/yii app/setup
58
- npm install --development
59
- npm run build
60
- env:
61
- DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
62
- TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
63
- - name: Run Tests
64
- run: |
65
- vendor/bin/codecept build
66
- php tests/bin/yii app/setup --interactive=0
67
- nohup php -S localhost:8080 > yii.log 2>&1 &
68
- vendor/bin/codecept run
69
- env:
70
- DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
71
- TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres