-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (43 loc) · 1.11 KB
/
step_linter.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: Step-Linter
on:
workflow_call:
inputs:
branch_name:
required: true
type: string
secrets:
NPM_TOKEN:
required: true
workflow_dispatch:
inputs:
branch_name:
description: "Branch name to Test"
required: true
default: "master"
env:
BRANCH_NAME: ${{ github.event.inputs.branch_name || inputs.branch_name }}
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Cache node deps
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Run Formatter Check
run: npm run format:check
- name: Run Linting Check
run: npm run lint