Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: run phpstan & php-cs-fixer on CI #3

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading