From a4eb7bc4ea84f74f37d6a91e733abb4259f70364 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Wed, 24 Jan 2024 09:55:12 +0100 Subject: [PATCH] Add PHPCS GitHub workflow --- .github/workflows/phpcs.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..592540a --- /dev/null +++ b/.github/workflows/phpcs.yml @@ -0,0 +1,32 @@ +name: PHP Code Sniffer + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + PHPCS: + name: PHPCS Scanner + runs-on: ubuntu-latest + permissions: + contents: read + actions: read + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Setup Environment + uses: php-actions/composer@v6 + + - name: Run PHPCS + uses: php-actions/phpcs@v1 + with: + php_version: "8.0" + path: src/ + standard: phpcs.xml.dist