Use prettier for SCSS (#3895)
[GitHub/WoltLab/WCF.git] / .github / workflows / codestyle.yml
index b038cd84122aac1fa11b5a3baf1a1c5cfa611394..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
@@ -30,3 +35,18 @@ jobs:
       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: |
+        git checkout -- package-lock.json
+        git diff --exit-code