-
Notifications
You must be signed in to change notification settings - Fork 309
52 lines (44 loc) · 1.26 KB
/
code_standard_check.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
name: Code standard check
on:
workflow_call:
inputs:
os:
required: true
type: string
node:
required: true
type: string
permissions:
contents: read
jobs:
lint:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 20
fetch-tags: false
- name: Restore cached node modules ♻️
id: cache-yarn
uses: actions/cache@v4
with:
path: |
.yarn/cache
node_modules
examples/example-app-monorepo/node_modules
examples/example-app-v17/node_modules
examples/example-app-v18/node_modules
examples/example-app-v19/node_modules
examples/example-app-yarn-workspace/node_modules
key: ${{ inputs.os }}-${{ inputs.node }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ inputs.os }}-${{ inputs.node }}-build
- name: Setup Node version ⚙️
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node }}
- name: Run ESLint check 🔍️
run: yarn lint
- name: Run Prettier check 🔍️
run: yarn lint-prettier-ci