Use prettier for SCSS (#3895)
[GitHub/WoltLab/WCF.git] / .github / workflows / codestyle.yml
CommitLineData
1fac1060
TD
1name: Code Style
2
3on:
4 push:
235ac9ba
TD
5 branches:
6 - "5.2"
7 - "5.3"
8 - master
1fac1060
TD
9 pull_request:
10
11jobs:
12 php:
a9229942 13 name: PHP
1fac1060
TD
14 runs-on: ubuntu-latest
15 steps:
16 - uses: actions/checkout@v2
a9229942
TD
17 - name: phpcs
18 uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
19 - name: php-cs-fixer
20 uses: docker://oskarstark/php-cs-fixer-ga
21 with:
22 args: --dry-run --diff-format udiff
af9f58ec
TD
23 ts:
24 name: TS Prettier
25 runs-on: ubuntu-latest
26 steps:
27 - uses: actions/checkout@v2
28 - run: npm install
fabbea2b
TD
29 - name: Run prettier
30 run: |
af9f58ec 31 shopt -s globstar
83713d5f 32 npx prettier -w ts/**/*.ts
af9f58ec 33 - run: echo "::add-matcher::.github/diff.json"
fabbea2b
TD
34 - name: Show diff
35 run: |
36 git checkout -- package-lock.json
af9f58ec 37 git diff --exit-code
8a52619a
TD
38 scss:
39 name: SCSS Prettier
40 runs-on: ubuntu-latest
41 steps:
42 - uses: actions/checkout@v2
43 - run: npm install
44 - name: Run prettier
45 run: |
46 shopt -s globstar
47 npx prettier -w wcfsetup/install/files/style/**/*.scss
48 - run: echo "::add-matcher::.github/diff.json"
49 - name: Show diff
50 run: |
51 git checkout -- package-lock.json
52 git diff --exit-code