feat(laravel-infrastructure): add phpstan #75
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: laravel-infrastructure-test | ||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- 'laravel-infrastructure/**' | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- 'laravel-infrastructure/**' | ||
defaults: | ||
run: | ||
working-directory: ./laravel-infrastructure | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php_version: [ 82, 83, 84 ] | ||
include: | ||
- php_version: 82 | ||
record_coverage: false | ||
- php_version: 83 | ||
record_coverage: true | ||
- php_version: 84 | ||
record_coverage: false | ||
concurrency: | ||
group: laravel-infrastructure-test-${{ github.workflow }}-${{ github.ref }}-${{ matrix.php_version }} | ||
cancel-in-progress: true | ||
container: | ||
image: ghcr.io/abenevaut/vapor-ci:php${{ matrix.php_version }} | ||
environment: | ||
Check failure on line 37 in .github/workflows/laravel-infrastructure-test.yml GitHub Actions / laravel-infrastructure-testInvalid workflow file
|
||
- php_xdebug_log=/var/task/xdebug-errors.log | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Configure Composer cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: laravel-infrastructure/vendor | ||
key: ${{ runner.os }}-node-php_${{ matrix.php_version }}-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-node-php_${{ matrix.php_version }}- | ||
- name: Validate Composer.json | ||
run: composer validate --strict | ||
- name: Composer install | ||
if: steps.composer-cache.outputs.cache-hit != 'true' | ||
run: composer install -o --no-interaction --prefer-dist | ||
- name: Run tests | ||
run: | | ||
vendor/bin/phpstan analyse | ||
vendor/bin/phpcs --standard=PSR12 src tests | ||
vendor/bin/phpunit | ||
- name: Send coverage | ||
if: ${{ matrix.record_coverage }} | ||
run: codecov -f coverage/clover.xml -F laravel-infrastructure | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |