diff --git a/.allowed-licenses b/.allowed-licenses new file mode 100644 index 0000000..653d0ea --- /dev/null +++ b/.allowed-licenses @@ -0,0 +1,3 @@ +- Artistic-1.0 +- BSD-3-Clause +- MIT diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..07ebbfe --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: +- package-ecosystem: composer + directory: "/" + schedule: + interval: daily + time: "04:00" + open-pull-requests-limit: 10 + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9a2dd7f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: ci +on: + pull_request: + push: + branches: + - "master" + +jobs: + run: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest'] + php-versions: ['8.2'] + coveralls: [ false ] + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Configure PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: composer:v2 + coverage: xdebug + extensions: bcmath, gd + + - name: Install Composer dependencies + run: composer install + + - name: Composer license check + run: composer check-license + + - name: Codesniffer + run: composer cs + + - name: Static code analysis + run: composer static-analysis + + - name: Unittests + run: composer test diff --git a/composer.json b/composer.json index 2abdbe9..00cfbec 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,7 @@ "cs-gitlab": "vendor/bin/php-cs-fixer fix --dry-run --format=gitlab --using-cache=no > gl-cs-fixer.json", "cs-fix": "vendor/bin/php-cs-fixer fix", "check-license": "vendor/bin/license-checker check", - "static-analysis": "vendor/bin/phpstan" + "static-analysis": "vendor/bin/phpstan", + "test": "vendor/bin/phpunit" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f377482..2f12676 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,20 +1,13 @@ - - - ./src/bitExpert - - ./tests/ diff --git a/tests/bitExpert/PHPStan/Sylius/Rule/Grid/ResourceAwareGridNeedsResourceClassUnitTest.php b/tests/bitExpert/PHPStan/Sylius/Rule/Grid/ResourceAwareGridNeedsResourceClassUnitTest.php index 8276ae9..aa15b72 100644 --- a/tests/bitExpert/PHPStan/Sylius/Rule/Grid/ResourceAwareGridNeedsResourceClassUnitTest.php +++ b/tests/bitExpert/PHPStan/Sylius/Rule/Grid/ResourceAwareGridNeedsResourceClassUnitTest.php @@ -30,10 +30,6 @@ public function testRule(): void $this->analyse( [__DIR__ . '/data/grid.php'], [ - [ - 'getResourceClass() needs to provide a resource class. Mark "App\Entity\Supplier" with #[AsResource] attribute.', - 51, - ], ], ); }