Skip to content

Commit 349f5be

Browse files
committed
ci: add lockfile lint
Signed-off-by: Rifa Achrinza <[email protected]>
1 parent b5ab8c5 commit 349f5be

File tree

3 files changed

+589
-11
lines changed

3 files changed

+589
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,34 @@ jobs:
2121
- 16
2222
- 17
2323
steps:
24-
- uses: actions/checkout@v2
25-
- name: Use Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v1
27-
with:
28-
node-version: ${{ matrix.node-version }}
29-
- name: Install Dependencies
30-
run: npm ci --ignore-scripts
31-
- name: Run Tests
32-
run: npm test --ignore-scripts
24+
- uses: actions/checkout@v2
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
- name: Install Dependencies
30+
run: npm ci --ignore-scripts
31+
- name: Run Tests
32+
run: npm test --ignore-scripts
33+
code-lint:
34+
name: Code Lint
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Use Node.js 16
39+
uses: actions/setup-node@v1
40+
with:
41+
node-version: 16 # LTS
42+
- name: Install Dependencies
43+
run: npm ci --ignore-scripts
44+
- name: Lockfile Lint
45+
run: |
46+
npm exec \
47+
--no-install \
48+
--package=lockfile-lint \
49+
-- \
50+
lockfile-lint \
51+
--allowed-hosts=npm \
52+
--path=./package-lock.json \
53+
--validate-https \
54+
--validate-package-names

0 commit comments

Comments
 (0)