|
1 | | -name: CI |
| 1 | +name: PHPUnit |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
| 5 | + paths: &paths |
| 6 | + - .github/workflows/phpunit.yml |
| 7 | + - config/** |
| 8 | + - skeleton/** |
| 9 | + - src/** |
| 10 | + - tests/** |
| 11 | + - composer.json |
| 12 | + - phpunit* |
5 | 13 | pull_request: |
| 14 | + paths: *paths |
6 | 15 | schedule: |
7 | 16 | - cron: '0 0 1,16 * *' |
8 | 17 |
|
| 18 | +concurrency: |
| 19 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 20 | + cancel-in-progress: true |
| 21 | + |
9 | 22 | jobs: |
10 | 23 | tests: |
11 | 24 | name: P:${{ matrix.php }}, S:${{ matrix.symfony }}, D:${{ matrix.database }}, PU:${{ matrix.phpunit }}${{ matrix.deps == 'lowest' && ' (lowest)' || '' }}${{ matrix.use-phpunit-extension == 1 && ' (phpunit extension)' || '' }}${{ (matrix.use-php-84-lazy-objects != 1 || matrix.php != '8.4') && ' (legacy proxy)' || '' }} |
@@ -221,6 +234,7 @@ jobs: |
221 | 234 | run: | |
222 | 235 | vendor/bin/phpunit tests/Unit |
223 | 236 |
|
| 237 | +
|
224 | 238 | test-with-paratest: |
225 | 239 | name: Test with paratest |
226 | 240 | runs-on: ubuntu-latest |
@@ -313,78 +327,3 @@ jobs: |
313 | 327 | with: |
314 | 328 | file: ./coverage.xml |
315 | 329 |
|
316 | | - composer-validate: |
317 | | - uses: zenstruck/.github/.github/workflows/php-composer-validate.yml@main |
318 | | - |
319 | | - lint-docs: |
320 | | - name: Lint Documentation |
321 | | - runs-on: ubuntu-latest |
322 | | - steps: |
323 | | - - name: "Checkout code" |
324 | | - uses: actions/checkout@v3 |
325 | | - |
326 | | - - name: DOCtor-RST |
327 | | - uses: docker://oskarstark/doctor-rst |
328 | | - with: |
329 | | - args: --short --error-format=github |
330 | | - env: |
331 | | - DOCS_DIR: 'docs/' |
332 | | - |
333 | | - static-analysis: |
334 | | - name: Static Analysis |
335 | | - runs-on: ubuntu-latest |
336 | | - steps: |
337 | | - - name: Checkout code |
338 | | - uses: actions/checkout@v3 |
339 | | - |
340 | | - - name: Setup PHP |
341 | | - uses: shivammathur/setup-php@v2 |
342 | | - with: |
343 | | - php-version: 8.4 |
344 | | - coverage: none |
345 | | - |
346 | | - - name: Install dependencies |
347 | | - uses: ramsey/composer-install@v2 |
348 | | - with: |
349 | | - composer-options: --prefer-dist |
350 | | - |
351 | | - - name: Validate PSR-4 |
352 | | - run: composer dump-autoload --optimize --strict-psr --strict-ambiguous |
353 | | - |
354 | | - - name: Install PHPStan |
355 | | - run: composer bin phpstan install |
356 | | - |
357 | | - - name: Install PHPBench |
358 | | - run: composer bin phpbench install |
359 | | - |
360 | | - - name: Run static analysis |
361 | | - run: bin/tools/phpstan/vendor/phpstan/phpstan/phpstan analyse |
362 | | - |
363 | | - - name: Install Psalm |
364 | | - run: composer bin psalm install |
365 | | - |
366 | | - - name: Run Psalm on factories generated with maker |
367 | | - run: bin/tools/psalm/vendor/vimeo/psalm/psalm |
368 | | - |
369 | | - fixcs: |
370 | | - name: Run php-cs-fixer |
371 | | - needs: sync-with-template |
372 | | - if: (github.event_name == 'push' || github.event_name == 'schedule') && !startsWith(github.ref, 'refs/tags') && github.repository_owner == 'zenstruck' |
373 | | - runs-on: ubuntu-latest |
374 | | - steps: |
375 | | - - uses: zenstruck/.github/actions/php-cs-fixer@main |
376 | | - with: |
377 | | - php: 8.1 |
378 | | - key: ${{ secrets.GPG_PRIVATE_KEY }} |
379 | | - token: ${{ secrets.COMPOSER_TOKEN }} |
380 | | - |
381 | | - sync-with-template: |
382 | | - name: Sync meta files |
383 | | - if: (github.event_name == 'push' || github.event_name == 'schedule') && !startsWith(github.ref, 'refs/tags') && github.repository_owner == 'zenstruck' |
384 | | - runs-on: ubuntu-latest |
385 | | - steps: |
386 | | - - uses: zenstruck/.github/actions/sync-with-template@main |
387 | | - with: |
388 | | - key: ${{ secrets.GPG_PRIVATE_KEY }} |
389 | | - token: ${{ secrets.COMPOSER_TOKEN }} |
390 | | - phpcsconfig: false |
0 commit comments