forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.63 KB
/
01-lint-admin.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
name: Lint Admin
on:
push:
branches:
- trunk
paths:
- src/Administration/Resources/app/administration/**/*
pull_request:
paths:
- src/Administration/Resources/app/administration/**/*
jobs:
check:
runs-on: ubuntu-latest
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
steps:
- name: Clone platform
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Retrieve the cached "node_modules" directory (if present)
uses: actions/cache@v2
id: node-cache
with:
path: src/Administration/Resources/app/administration/node_modules
key: admin-node-modules-${{ runner.os }}-${{ hashFiles('src/Administration/Resources/app/administration/package-lock.json') }}
- name: Install dependencies (if the cached directory was not found)
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm --prefix src/Administration/Resources/app/administration ci --no-audit --prefer-offline
- name: Cache ESLint
uses: actions/cache@v2
with:
path: src/Administration/Resources/app/administration/node_modules/.eslintcache
key: admin-eslint-${{ runner.os }}
- name: Cache Stylelint
uses: actions/cache@v2
with:
path: src/Administration/Resources/app/administration/node_modules/.stylelintcache
key: admin-stylelint-${{ runner.os }}
- name: Check Code
run: |
cd src/Administration/Resources/app/administration
npm run lint
npm run lint:types
npm run lint:scss