Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Check whether npm deduping is needed #53

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading