|
5 | 5 | runs-on: ubuntu-latest |
6 | 6 | strategy: |
7 | 7 | matrix: |
| 8 | + experimental: |
| 9 | + - false |
8 | 10 | php-version: |
9 | 11 | - '7.2' |
10 | 12 | - '7.3' |
@@ -38,22 +40,24 @@ jobs: |
38 | 40 |
|
39 | 41 | - name: Delete composer lock file |
40 | 42 | id: composer-lock |
41 | | - if: ${{ matrix.php-version == '8.0' || matrix.php-version == '8.1' }} |
| 43 | + if: ${{ matrix.php-version == '8.1' }} |
42 | 44 | run: | |
43 | 45 | rm composer.lock |
44 | 46 | echo "::set-output name=flags::--ignore-platform-reqs" |
45 | 47 |
|
46 | 48 | - name: Install dependencies |
47 | | - run: composer install --no-progress --prefer-dist --optimize-autoloader ${{ steps.composer-lock.outputs.flags }} |
| 49 | + run: composer update --no-progress --prefer-dist --optimize-autoloader ${{ steps.composer-lock.outputs.flags }} |
48 | 50 |
|
49 | 51 | - name: Setup problem matchers for PHP |
50 | 52 | run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" |
51 | 53 |
|
52 | 54 | - name: Setup problem matchers for PHPUnit |
53 | 55 | run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
54 | 56 |
|
55 | | - - name: Test with PHPUnit |
56 | | - run: ./vendor/bin/phpunit |
| 57 | + - name: "Run PHPUnit tests (Experimental: ${{ matrix.experimental }})" |
| 58 | + env: |
| 59 | + FAILURE_ACTION: "${{ matrix.experimental == true }}" |
| 60 | + run: vendor/bin/phpunit --verbose || $FAILURE_ACTION |
57 | 61 |
|
58 | 62 | php-cs-fixer: |
59 | 63 | runs-on: ubuntu-latest |
@@ -117,6 +121,68 @@ jobs: |
117 | 121 | - name: Code style with PHP_CodeSniffer |
118 | 122 | run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr |
119 | 123 |
|
| 124 | + versions: |
| 125 | + runs-on: ubuntu-latest |
| 126 | + steps: |
| 127 | + - name: Checkout |
| 128 | + uses: actions/checkout@v2 |
| 129 | + |
| 130 | + - name: Setup PHP, with composer and extensions |
| 131 | + uses: shivammathur/setup-php@v2 |
| 132 | + with: |
| 133 | + php-version: 7.4 |
| 134 | + extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib |
| 135 | + coverage: none |
| 136 | + tools: cs2pr |
| 137 | + |
| 138 | + - name: Get composer cache directory |
| 139 | + id: composer-cache |
| 140 | + run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 141 | + |
| 142 | + - name: Cache composer dependencies |
| 143 | + uses: actions/cache@v2 |
| 144 | + with: |
| 145 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 146 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 147 | + restore-keys: ${{ runner.os }}-composer- |
| 148 | + |
| 149 | + - name: Install dependencies |
| 150 | + run: composer install --no-progress --prefer-dist --optimize-autoloader |
| 151 | + |
| 152 | + - name: Code Version Compatibility check with PHP_CodeSniffer |
| 153 | + run: ./vendor/bin/phpcs -q --report-width=200 --report=summary,full src/ --standard=PHPCompatibility --runtime-set testVersion 7.2- |
| 154 | + |
| 155 | + phpstan: |
| 156 | + runs-on: ubuntu-latest |
| 157 | + steps: |
| 158 | + - name: Checkout |
| 159 | + uses: actions/checkout@v2 |
| 160 | + |
| 161 | + - name: Setup PHP, with composer and extensions |
| 162 | + uses: shivammathur/setup-php@v2 |
| 163 | + with: |
| 164 | + php-version: 7.4 |
| 165 | + extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib |
| 166 | + coverage: none |
| 167 | + tools: cs2pr |
| 168 | + |
| 169 | + - name: Get composer cache directory |
| 170 | + id: composer-cache |
| 171 | + run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 172 | + |
| 173 | + - name: Cache composer dependencies |
| 174 | + uses: actions/cache@v2 |
| 175 | + with: |
| 176 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 177 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 178 | + restore-keys: ${{ runner.os }}-composer- |
| 179 | + |
| 180 | + - name: Install dependencies |
| 181 | + run: composer install --no-progress --prefer-dist --optimize-autoloader |
| 182 | + |
| 183 | + - name: Static analysis with PHPStan |
| 184 | + run: ./vendor/bin/phpstan analyse |
| 185 | + |
120 | 186 | coverage: |
121 | 187 | runs-on: ubuntu-latest |
122 | 188 | steps: |
|
0 commit comments