Set-up php-cs-fixer using setup-php in codestyle workflow
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 19 Apr 2021 12:13:48 +0000 (14:13 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 19 Apr 2021 12:45:32 +0000 (14:45 +0200)
This allows us to easily install extensions.

.github/workflows/codestyle.yml

index 0bc896dc9fe38961f7b4279daaa5383536e28813..cc1a2be2d2ae1c518d0ecf5e22ef517e0a41dd75 100644 (file)
@@ -16,10 +16,14 @@ jobs:
     - uses: actions/checkout@v2
     - name: phpcs
       uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
-    - name: php-cs-fixer
-      uses: docker://oskarstark/php-cs-fixer-ga
+    - name: Setup PHP with tools
+      uses: shivammathur/setup-php@v2
       with:
-        args: --dry-run --diff-format udiff
+        php-version: '7.4'
+        extensions: ctype, dom, exif, gd, gmp, hash, intl, json, libxml, mbstring, opcache, pcre, pdo, pdo_mysql, zlib
+        tools: php-cs-fixer
+    - name: php-cs-fixer
+      run: php-cs-fixer fix --dry-run --diff-format udiff
   ts:
     name: TS Prettier
     runs-on: ubuntu-latest