preactjs / compressed-size-action

GitHub Action that adds compressed size changes to your PRs.
https://github.com/marketplace/actions/compressed-size-action
MIT License
602 stars 84 forks source link

Allow skipping install. #83

Closed seivan closed 7 months ago

seivan commented 2 years ago

Using zero-install PnP with yarn doesn't play well when intalling using --frozen-lockfile. Allow opting out of installing all together.

Don't mind doing the PR if it's ok.

NateRadebaugh commented 2 years ago

This feature would also help when npm deps require npm ci --force for the action to work. aka deps that still don't officially support react 18.x even though things may work fine.

PixnBits commented 1 year ago

Or when postinstall runs some npm scripts to help devs out, but requires devDeps and the bundles need NODE_ENV=production.

85 & #88 add customization to the installation, but it may be better to pull this step out (do the one thing well principle)? 🤔

i.e. https://github.com/preactjs/compressed-size-action#usage becomes:

name: Compressed Size

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - run: npm ci
      - uses: preactjs/compressed-size-action@v2

lots of variations, e.g.:

      - run: npm ci --include=dev
      # or
      - run: npm ci --ignore-scripts
      # or, for those in a tight spot
      - run: npm ci --force
      # or combinations thereof

This would also remove the need of supporting various package managers, though that support has already been added for the most used 😅.

rschristian commented 7 months ago

85 probably addresses this reasonably, feel free to comment if there's something better we could land though