Skip to content

Commit

Permalink
Merge pull request #53 from nikobockerman/ci-check-npm-dedupe
Browse files Browse the repository at this point in the history
ci: Check whether npm deduping is needed
  • Loading branch information
nikobockerman authored Dec 4, 2024
2 parents 82e218c + e845841 commit 0c21269
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/check-npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check - npm and dependencies

on:
pull_request:
paths:
- ".github/actions/npm-tools-setup/**"
- ".github/workflows/check-npm.yaml"
- "package.json"
- "package-lock.json"
workflow_call:
workflow_dispatch:

jobs:
duplicate-dependencies:
name: Check for duplicate dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup npm tools
uses: ./.github/actions/npm-tools-setup
- name: Check for duplicate dependencies
run: npm run check:npm:dedupe
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"scripts": {
"check:github-actions": "git ls-files '.github/**.yaml' | xargs -t -I {} action-validator {}",
"check:npm:dedupe": "npm find-dupes",
"check:prettier": "prettier --check .",
"check:renovateconfig": "npx --package=renovate -- renovate-config-validator --strict",
"fix:prettier": "prettier --write ."
Expand Down
4 changes: 4 additions & 0 deletions taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ tasks:
desc: "Check - Github actions"
cmds:
- npm run check:github-actions
check:npm:dedupe:
desc: "Check - npm dedupe"
cmds:
- npm run check:npm:dedupe
check:prettier:
desc: "Check - prettier"
cmds:
Expand Down

0 comments on commit 0c21269

Please sign in to comment.