|
7 | 7 | env:
|
8 | 8 | COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
9 | 9 | SHELL_VERBOSITY: 1
|
10 |
| - OCULAR_BIN: $HOME/.bin/ocular.phar |
| 10 | + OCULAR_BIN: ocular.phar |
11 | 11 |
|
12 | 12 | jobs:
|
13 | 13 | php-cs-fixer:
|
|
52 | 52 | - name: Setup MySQL
|
53 | 53 | run: |
|
54 | 54 | sudo systemctl start mysql.service
|
| 55 | + mysqladmin -u root -proot password '' |
55 | 56 | mysql -u root -e 'create database hautelook_alice_bundle;'
|
56 | 57 | - name: Setup coverage
|
57 | 58 | if: matrix.coverage
|
@@ -81,14 +82,51 @@ jobs:
|
81 | 82 | run: composer config platform.php 7.4.99
|
82 | 83 | - name: Update project dependencies
|
83 | 84 | run: composer update --no-interaction --no-progress --prefer-dist --ansi
|
84 |
| - - name: Clear test app cache |
85 |
| - run: tests/Fixtures/app/console cache:clear --ansi |
86 | 85 | - name: Run tests
|
87 |
| - if: !matrix.coverage |
| 86 | + if: '!matrix.coverage' |
88 | 87 | run: vendor/bin/phpunit --verbose --stop-on-failure
|
89 | 88 | - name: Run tests
|
90 | 89 | if: matrix.coverage
|
91 | 90 | run: vendor/bin/phpunit --verbose --stop-on-failure --coverage-text --coverage-clover=coverage.xml
|
92 | 91 | - name: Upload coverage
|
93 | 92 | if: matrix.coverage
|
94 |
| - run: $OCULAR_BIN code-coverage:upload --format=php-clover coverage.xml |
| 93 | + run: php $OCULAR_BIN code-coverage:upload --format=php-clover coverage.xml |
| 94 | + |
| 95 | + phpunit-lowest: |
| 96 | + name: PHPUnit (PHP ${{ matrix.php }} lowest deps) |
| 97 | + runs-on: ubuntu-latest |
| 98 | + timeout-minutes: 20 |
| 99 | + strategy: |
| 100 | + matrix: |
| 101 | + php: |
| 102 | + - '7.3' |
| 103 | + fail-fast: false |
| 104 | + steps: |
| 105 | + - name: Checkout |
| 106 | + uses: actions/checkout@v2 |
| 107 | + - name: Setup MySQL |
| 108 | + run: | |
| 109 | + sudo systemctl start mysql.service |
| 110 | + mysqladmin -u root -proot password '' |
| 111 | + mysql -u root -e 'create database hautelook_alice_bundle;' |
| 112 | + - name: Setup PHP |
| 113 | + uses: shivammathur/setup-php@v2 |
| 114 | + with: |
| 115 | + php-version: ${{ matrix.php }} |
| 116 | + tools: pecl, composer |
| 117 | + extensions: intl, bcmath, curl, openssl, mbstring |
| 118 | + coverage: pcov |
| 119 | + ini-values: memory_limit=-1 |
| 120 | + - name: Get composer cache directory |
| 121 | + id: composercache |
| 122 | + run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 123 | + - name: Cache dependencies |
| 124 | + uses: actions/cache@v2 |
| 125 | + with: |
| 126 | + path: ${{ steps.composercache.outputs.dir }} |
| 127 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} |
| 128 | + restore-keys: ${{ runner.os }}-composer- |
| 129 | + - name: Update project dependencies |
| 130 | + run: composer update --no-interaction --no-progress --prefer-lowest --ansi |
| 131 | + - name: Run tests |
| 132 | + run: vendor/bin/phpunit --verbose --stop-on-failure |
0 commit comments