Skip to content

Commit b9cf2f5

Browse files
committed
ci(dependency-review): move unused dependencies check to separate workflow file
1 parent 969b2c8 commit b9cf2f5

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

.github/workflows/dependency-review.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,3 @@ jobs:
1919
allow-licenses: MIT, Apache-2.0, BSD-3-Clause, ISC, BSD-2-Clause, Unlicense, CC0-1.0, 0BSD, X11, MPL-2.0, MPL-1.0, MPL-1.1, MPL-2.0
2020
fail-on-scopes: development, runtime
2121
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'
22-
- name: 'Setup Node.js'
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: '18.x'
26-
- name: 'Run depcheck'
27-
run: |
28-
npx depcheck --skip-missing --ignores="@babel/*,@commitlint/*,eslint-*,husky,mocha"
29-
echo $?
30-
if [[ $? == 1 ]]; then
31-
echo "Unused dependencies or devDependencies found."
32-
exit 1
33-
fi
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 'Unused Dependencies Check'
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
pull-requests: write
7+
8+
jobs:
9+
unused-dependecies:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 'Checkout Repository'
13+
uses: actions/checkout@v4
14+
- name: 'Setup Node.js'
15+
uses: actions/node@v4
16+
with:
17+
node-version: '18.x'
18+
- name: 'Run depcheck'
19+
run: |
20+
npx depcheck --skip-missing --ignores="@babel/*,@commitlint/*,@eslint-*,husky,mocha"
21+
echo $?
22+
if [[ $? == 1 ]]; then
23+
echo "Unused dependencies or devDependencies found"
24+
exit 1
25+
fi
26+

0 commit comments

Comments
 (0)