diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6b04b35..e2e1cdd 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -6,6 +6,11 @@ on: - master - 'issue/**' - develop + pull_request: + types: + - opened + - synchronize + - reopened permissions: contents: write @@ -51,6 +56,22 @@ jobs: APP_ENV: testing run: ./vendor/bin/phpunit --testdox tests/Unit tests/Telegram + phpcs: + name: Run PHP_CodeSniffer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP 7.4 + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + tools: phpcs + + - name: Run PHP_CodeSniffer + working-directory: module/oc_telegram_shop/upload/oc_telegram_shop + run: phpcs --standard=PSR12 bastion framework src + module-build: name: Build module. runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 26709a5..dd93338 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,9 @@ dev-admin: lint: docker compose exec -w /module/oc_telegram_shop/upload/oc_telegram_shop web bash -c "./vendor/bin/phpstan analyse src framework" +phpcs: + docker compose exec -w /module/oc_telegram_shop/upload/oc_telegram_shop web bash -c "./vendor/bin/phpcs --standard=PSR12 bastion framework src" + test: docker compose exec -w /module/oc_telegram_shop/upload/oc_telegram_shop web bash -c "./vendor/bin/phpunit --testdox tests/" diff --git a/frontend/admin/src/App.vue b/frontend/admin/src/App.vue index 9776f3c..7983b1b 100644 --- a/frontend/admin/src/App.vue +++ b/frontend/admin/src/App.vue @@ -29,6 +29,10 @@