forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.56 KB
/
01-lint-storefront.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
name: Lint Storefront
on:
push:
branches:
- trunk
paths:
- src/Storefront/Resources/app/storefront/**/*
pull_request:
paths:
- src/Storefront/Resources/app/storefront/**/*
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/Storefront/Resources/app/storefront/node_modules
key: storefront-node-modules-${{ runner.os }}-${{ hashFiles('src/Storefront/Resources/app/storefront/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/Storefront/Resources/app/storefront ci --no-audit --prefer-offline
- name: Cache ESLint
uses: actions/cache@v2
with:
path: src/Storefront/Resources/app/storefront/node_modules/.eslintcache
key: storefront-eslint-${{ runner.os }}
- name: Cache Stylelint
uses: actions/cache@v2
with:
path: src/Storefront/Resources/app/storefront/node_modules/.stylelintcache
key: storefront-stylelint-${{ runner.os }}
- name: Check Code
run: |
cd src/Storefront/Resources/app/storefront
npm run lint:js
npm run lint:scss