Skip to content

Commit

Permalink
ci(dependency-review): move unused dependencies check to separate wor…
Browse files Browse the repository at this point in the history
…kflow file
  • Loading branch information
divinetettey committed Jun 14, 2024
1 parent 969b2c8 commit b9cf2f5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,3 @@ jobs:
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
fail-on-scopes: development, runtime
allow-dependencies-licenses: 'pkg:npm/caniuse-lite'
- name: 'Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: 'Run depcheck'
run: |
npx depcheck --skip-missing --ignores="@babel/*,@commitlint/*,eslint-*,husky,mocha"
echo $?
if [[ $? == 1 ]]; then
echo "Unused dependencies or devDependencies found."
exit 1
fi
26 changes: 26 additions & 0 deletions .github/workflows/unused-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Unused Dependencies Check'
on: [pull_request]

permissions:
contents: read
pull-requests: write

jobs:
unused-dependecies:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Setup Node.js'
uses: actions/node@v4
with:
node-version: '18.x'
- name: 'Run depcheck'
run: |
npx depcheck --skip-missing --ignores="@babel/*,@commitlint/*,@eslint-*,husky,mocha"
echo $?
if [[ $? == 1 ]]; then
echo "Unused dependencies or devDependencies found"
exit 1
fi

0 comments on commit b9cf2f5

Please sign in to comment.