andresz1 / size-limit-action

Compare the real cost to run your JS app or lib to keep good performance in every pull request
ISC License
449 stars 83 forks source link

add support for pnpm #71

Closed nwaughachukwuma closed 2 years ago

nwaughachukwuma commented 2 years ago

Summary:

chambo-e commented 2 years ago

Hello @andresz1 👋

Would it be possible to deploy a new version including this please ? :)

andresz1 commented 2 years ago

Hello @chambo-e! New version deployed (v1), let me know if works as expected

chambo-e commented 2 years ago

@andresz1 works like a charm, thanks a lot :)

TriStarGod commented 2 years ago

Hi @andresz1 . Anytime I get a pull request, this github action fails with

size
Unable to locate executable file: pnpm. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

for size. Do you know what could be causing this error? I also don't know how to check if the file is executable.

meduzen commented 1 year ago

Hi @andresz1 . Anytime I get a pull request, this github action fails with

size
Unable to locate executable file: pnpm. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

for size. Do you know what could be causing this error? I also don't know how to check if the file is executable.

On my side, I had to explicity use pnpm/action-setup@v2 GitHub Action before size limit in order to be able to use it. In your GitHub action config:

name: Size limit

on:
  pull_request:
    branches:
      - main
jobs:
  size:
    runs-on: ubuntu-latest
    env:
      CI_JOB_NUMBER: 1
    steps:
      - uses: actions/checkout@v1
      - name: Use pnpm
        uses: pnpm/action-setup@v2
      - name: Use Size limit
        uses: andresz1/size-limit-action@dd31dce7dcc72a041fd3e49abf0502b13fc4ce05 # support for pnpm
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          package_manager: pnpm