From d4c1d178603c7311ecca012eba85aa57020164ef Mon Sep 17 00:00:00 2001 From: Florian Pesth Date: Tue, 14 Nov 2023 20:46:24 +0100 Subject: [PATCH] Create action to check against PSR12 coding standard --- .github/workflows/phpcs_psr12.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/phpcs_psr12.yml diff --git a/.github/workflows/phpcs_psr12.yml b/.github/workflows/phpcs_psr12.yml new file mode 100644 index 0000000..c86da7b --- /dev/null +++ b/.github/workflows/phpcs_psr12.yml @@ -0,0 +1,27 @@ +name: "CI" + +on: + pull_request: + paths: + - "html" + +jobs: + phpcs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # important! + + # we may use whatever way to install phpcs, just specify the path on the next step + # however, curl seems to be the fastest + - name: Install PHP_CodeSniffer + run: | + curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar + php phpcs.phar --version + + - uses: tinovyatkin/action-php-codesniffer@v1 + with: + files: "**.php" # you may customize glob as needed + phpcs_path: php phpcs.phar + standard: PSR12