Use prettier for SCSS (#3895)
[GitHub/WoltLab/WCF.git] / .github / workflows / codestyle.yml
index 61ecf78d3f880a8531e8d92b1676aa0f35bd53d0..efe2ce387e90d7b159f197d0e263aa6346caa016 100644 (file)
@@ -10,11 +10,16 @@ on:
 
 jobs:
   php:
-    name: PHP CodeSniffer
+    name: PHP
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v2
-    - uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
+    - name: phpcs
+      uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
+    - name: php-cs-fixer
+      uses: docker://oskarstark/php-cs-fixer-ga
+      with:
+        args: --dry-run --diff-format udiff
   ts:
     name: TS Prettier
     runs-on: ubuntu-latest
@@ -24,7 +29,22 @@ jobs:
     - name: Run prettier
       run: |
         shopt -s globstar
-        npx prettier -w wcfsetup/install/files/ts/**/*.ts
+        npx prettier -w ts/**/*.ts
+    - run: echo "::add-matcher::.github/diff.json"
+    - name: Show diff
+      run: |
+        git checkout -- package-lock.json
+        git diff --exit-code
+  scss:
+    name: SCSS Prettier
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - run: npm install
+    - name: Run prettier
+      run: |
+        shopt -s globstar
+        npx prettier -w wcfsetup/install/files/style/**/*.scss
     - run: echo "::add-matcher::.github/diff.json"
     - name: Show diff
       run: |