feat(pr-lint): support npm, yarn and pnpm (#172)

* feat(pr-lint): support npm, yarn and pnpm

* chore(ci): resolve cr comments

* chore(ci): support all pkg manager caches

* chore(ci): reword comment

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
2025-06-23 21:23:20 +03:00
committed by GitHub
parent 1c171a4041
commit 8e3941c196

View File

@@ -47,13 +47,21 @@ runs:
- name: Setup Node.js and run tests
if: steps.detect-node.outputs.found == 'true'
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
cache: 'npm'
- name: Install Node.js dependencies
if: steps.detect-node.outputs.found == 'true'
shell: bash
run: npm ci
run: |
if [ -f pnpm-lock.yaml ]; then
npm install -g pnpm # GitHub Actions runners dont come with pnpm
pnpm install
elif [ -f yarn.lock ]; then
yarn install
elif [ -f package-lock.json ]; then
npm ci
else
echo "No supported lockfile found, skipping Node.js dependencies installation."
fi
# PHP tests if composer.json exists
- name: Detect composer.json