From 81d4ab0d7f5151d4295ed66cded98a6cbd5c7428 Mon Sep 17 00:00:00 2001 From: Ivan Pugach Date: Mon, 24 Jun 2024 20:43:37 +0300 Subject: [PATCH] [PT-1550] Add GitHub Actions to run Magento 2 Code Sniffer on PR --- .github/workflows/phpcs.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/phpcs.yml diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml new file mode 100644 index 0000000..21348f6 --- /dev/null +++ b/.github/workflows/phpcs.yml @@ -0,0 +1,27 @@ +name: PHP CodeSniffer + +on: + pull_request: + branches: + - main + +jobs: + phpcs: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + tools: composer + + - name: Install dependencies + run: composer install + + - name: Run PHP CodeSniffer + run: vendor/bin/phpcs --standard=PSR12,Magento2 . +