Skip to content

Commit

Permalink
Add running QA tools in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Sep 5, 2024
1 parent b97a926 commit 46195b0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ jobs:
symfony_version: ${{ matrix.symfony }}
sylius_version: ${{ matrix.sylius }}
e2e_js: true

- name: Check dependencies
run: vendor/bin/composer-dependency-analyser

- name: Static analysis
run: vendor/bin/phpstan

- name: Check coding standard
run: vendor/bin/ecs check

- name: Run tests
run: vendor/bin/phpunit
14 changes: 14 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType;

$config = new Configuration();

return $config
//// Adjusting scanned paths
->addPathToScan(__DIR__ . '/src', isDev: false)
->disableComposerAutoloadPathScan() // disable automatic scan of autoload & autoload-dev paths from composer.json
->ignoreErrorsOnPackage('sylius/sylius', [ErrorType::DEV_DEPENDENCY_IN_PROD])
->ignoreErrorsOnPackage('sylius/core-bundle', [ErrorType::UNUSED_DEPENDENCY])
;
14 changes: 11 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"license": "MIT",
"autoload": {
"psr-4": {
"CommerceWeavers\\SyliusTpayPlugin\\": "src/",
"Tests\\CommerceWeavers\\SyliusTpayPlugin\\Behat\\": "tests/Behat"
"CommerceWeavers\\SyliusTpayPlugin\\": "src/"
}
},
"autoload-dev": {
Expand All @@ -18,7 +17,15 @@
"require": {
"php": "^8.0",
"sylius/core-bundle": "^1.12",
"tpay-com/tpay-openapi-php": "^1.8"
"tpay-com/tpay-openapi-php": "^1.8",
"payum/core": "^1.7",
"sylius/resource-bundle": "^1.10",
"symfony/config": "5.4.* || ^6.0",
"symfony/dependency-injection": "5.4.* || ^6.0",
"symfony/form": "5.4.* || ^6.0",
"symfony/http-foundation": "5.4.* || ^6.0",
"symfony/http-kernel": "5.4.* || ^6.0",
"symfony/routing": "5.4.* || ^6.0"
},
"conflict": {
"sylius/sylius": "<1.12"
Expand All @@ -32,6 +39,7 @@
"phpstan/phpstan-webmozart-assert": "^1.2.0",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"shipmonk/composer-dependency-analyser": "^1.7",
"sylius-labs/coding-standard": "^4.2",
"sylius/sylius": "^1.12",
"symfony/browser-kit": "^5.4 || ^6.0",
Expand Down

0 comments on commit 46195b0

Please sign in to comment.