-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (53 loc) · 1.96 KB
/
linting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Fixing code format
on:
workflow_dispatch:
workflow_call:
permissions:
contents: write
pull-requests: write
issues: read
jobs:
phplint:
runs-on: ubuntu-latest
name: 🔧 Lint the code
steps:
- name: ⏳ Check out repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
- name: ⏳ Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- name: ⏳ Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: ⏳ Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: ⏳ Install PHP dependencies
uses: "ramsey/composer-install@v2"
with:
composer-options: "--no-ansi --no-interaction --no-scripts --no-progress"
- run: npm install
name: ⏳ Install JS dependencies
working-directory: './dashboard'
- run: npm install -g @quasar/cli
name: ⏳ Install the Quasar CLI
- name: 🔧 Run cs fixer
run: ./vendor/bin/php-cs-fixer fix
- run: npm run format
name: 🔧 Run the js linter
working-directory: './dashboard'
- name: 💾 Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[CI - Linting] Run cs-fixer and eslint'
skip_fetch: true