Skip to content

Commit

Permalink
Merge pull request #3 from treyssatvincent/chore/run-phpstan-php-cs-f…
Browse files Browse the repository at this point in the history
…ixer-on-ci

chore: run phpstan & php-cs-fixer on CI
  • Loading branch information
treyssatvincent committed Dec 21, 2023
2 parents 966c91e + 24c5751 commit e9db62c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@ name: run-tests
on: [push, pull_request]

jobs:
quality-tools:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ 8.3 ]
laravel: [ 10.* ]
dependency-version: [ prefer-stable ]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql
coverage: none

- name: Install dependencies
run: |
composer install --prefer-dist --no-interaction --no-suggest
- name: Execute php-cs-fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff

- name: Execute phpstan
run: vendor/bin/phpstan

test:
runs-on: ubuntu-latest
strategy:
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.41",
"orchestra/testbench": "^8.18 || ^v7.38",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.1 || ^9.6"
},
"autoload": {
Expand Down
4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
paths:
- src
level: max
2 changes: 2 additions & 0 deletions src/MissingNextcloudUsernameException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Nino\FilesystemProviders;

class MissingNextcloudUsernameException extends \Exception
Expand Down

0 comments on commit e9db62c

Please sign in to comment.