From 8f91d282d2637e353ccf39eebe27c58797b682b0 Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Thu, 16 Jan 2025 18:01:54 +0700 Subject: [PATCH] ci: add deduped packages check --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2208e460..c0765839 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,3 +40,25 @@ jobs: # if: ${{ github.event.pull_request.base.ref == 'release' }} # env: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + dedupe-check: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/next' + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install pnpm + run: npm install -g pnpm@9.0.4 + + - name: Run pnpm dedupe + run: pnpm dedupe + + - name: Check for changes + run: | + if ! git diff --exit-code --quiet pnpm-lock.yaml; then + echo "pnpm dedupe introduced changes:" + git diff --color=always pnpm-lock.yaml + exit 1 + else + echo "No changes detected after pnpm dedupe in pnpm-lock.yaml" + fi \ No newline at end of file