|
13 | 13 | strategy: |
14 | 14 | fail-fast: false |
15 | 15 | matrix: |
16 | | - php-version: ['8.0'] |
17 | | - db-type: ['sqlite', 'mysql', 'pgsql'] |
18 | | - prefer-lowest: [''] |
| 16 | + php-version: [ '8.0' ] |
| 17 | + db-type: [ 'sqlite', 'mysql', 'pgsql' ] |
| 18 | + prefer-lowest: [ '' ] |
19 | 19 | include: |
20 | 20 | - php-version: '8.0' |
21 | 21 | db-type: 'sqlite' |
@@ -67,24 +67,24 @@ jobs: |
67 | 67 | fi |
68 | 68 | if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then composer lowest-setup; fi |
69 | 69 |
|
70 | | -# - name: Setup problem matchers for PHPUnit |
71 | | -# if: matrix.db-type == 'mysql' |
72 | | -# run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
73 | | - |
74 | | -# - name: Wait for MySQL |
75 | | -# if: matrix.db-type == 'mysql' |
76 | | -# run: while ! `mysqladmin ping -h 127.0.0.1 --silent`; do printf 'Waiting for MySQL...\n'; sleep 2; done; |
77 | | - |
78 | | -# - name: Run PHPUnit |
79 | | -# run: | |
80 | | -# if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi |
81 | | -# if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp?encoding=utf8'; fi |
82 | | -# if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi |
83 | | -# if [[ ${{ matrix.php-version }} == '7.3' && ${{ matrix.db-type }} == 'sqlite' ]]; then |
84 | | -# vendor/bin/phpunit --coverage-clover=coverage.xml |
85 | | -# else |
86 | | -# vendor/bin/phpunit |
87 | | -# fi |
| 70 | + - name: Setup problem matchers for PHPUnit |
| 71 | + if: matrix.db-type == 'mysql' |
| 72 | + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 73 | + |
| 74 | + - name: Wait for MySQL |
| 75 | + if: matrix.db-type == 'mysql' |
| 76 | + run: while ! `mysqladmin ping -h 127.0.0.1 --silent`; do printf 'Waiting for MySQL...\n'; sleep 2; done; |
| 77 | + |
| 78 | + - name: Run PHPUnit |
| 79 | + run: | |
| 80 | + if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi |
| 81 | + if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp?encoding=utf8'; fi |
| 82 | + if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi |
| 83 | + if [[ ${{ matrix.php-version }} == '8.0' && ${{ matrix.db-type }} == 'sqlite' ]]; then |
| 84 | + vendor/bin/phpunit --coverage-clover=coverage.xml |
| 85 | + else |
| 86 | + vendor/bin/phpunit |
| 87 | + fi |
88 | 88 |
|
89 | 89 | - name: Validate prefer-lowest |
90 | 90 | run: if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then vendor/bin/validate-prefer-lowest -m; fi |
|
0 commit comments