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

skip_step install not skipping install step #81

Open
Soviut opened this issue Jun 11, 2022 · 3 comments
Open

skip_step install not skipping install step #81

Soviut opened this issue Jun 11, 2022 · 3 comments

Comments

@Soviut
Copy link

Soviut commented Jun 11, 2022

I'm trying to skip the install step so that I can install manually. I need to install manually so I can use some install flags to ignore peer dependency warnings in npm 8 which halts the build.

.github/workflows/size-limit.yml

name: size

on: [pull_request]

jobs:
  size:
    runs-on: ubuntu-latest

    env:
      CI_JOB_NUMBER: 1

    steps:
      - uses: actions/checkout@v3

      - name: Install dependencies
        run: npm ci --legacy-peer-deps

      - uses: andresz1/size-limit-action@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          skip_step: install

The build logs look like this (slightly truncated and anonymized)

/usr/local/bin/npm run build
> [email protected] build
> vue-tsc --noEmit && vite build
vite v2.8.6 building for production...
transforming...
✓ 1060 modules transformed.
rendering chunks...
[[[A BUNCH OF CHUNKS]]]
(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

/usr/local/bin/npx size-limit --json
[
  {
    "name": "dist/assets/index.32071fe5.js, dist/assets/index.ae5488d4.js",
    "passed": true,
    "size": 34324,
    "running": 0.49793333333333334,
    "loading": 0.670390625
  },
  {
    "name": "dist/assets/index.e64127f8.css",
    "passed": true,
    "size": 10312,
    "running": 0,
    "loading": 0.20140625
  },
  {
    "name": "dist/assets/vendor.0fadab2e.js",
    "passed": true,
    "size": 238644,
    "running": 0.6442333333333333,
    "loading": 4.661015625
  }
]

/usr/bin/git fetch origin master --depth=1
From https://github.com/SOMECOMPANY/invoice-portal
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master

/usr/bin/git checkout -f master
Previous HEAD position was [[[SOME HASH]]]
Switched to a new branch 'master'
branch 'master' set up to track 'origin/master'.

/usr/local/bin/npm install    <------[[[IT IS STILL INSTALLING???]]]
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/puppeteer-core
npm ERR!   puppeteer-core@"13.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer puppeteer-core@"^10.1.0" from [email protected]
npm ERR! node_modules/chrome-aws-lambda
npm ERR!   chrome-aws-lambda@"^10.1.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/puppeteer-core
npm ERR!   peer puppeteer-core@"^10.1.0" from [email protected]
npm ERR!   node_modules/chrome-aws-lambda
npm ERR!     chrome-aws-lambda@"^10.1.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/runner/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/[20](https://github.com/SOMECOMPANY/invoice-portal/runs/6838458695?check_suite_focus=true#step:4:21)22-06-10T[21](https://github.com/SOMECOMPANY/invoice-portal/runs/6838458695?check_suite_focus=true#step:4:22)_50_10_4[29](https://github.com/SOMECOMPANY/invoice-portal/runs/6838458695?check_suite_focus=true#step:4:30)Z-debug-0.log
Error: The process '/usr/local/bin/npm' failed with exit code 1
@elidupuis
Copy link

elidupuis commented Jun 30, 2022

I just ran into this as well. It looks like the install step that is running is the (even with the skip_install flag set) is for the size comparison between the PR and the base branch. The skip_install flag is not being passed to this size-limit execution:

I assume this is intentional because it needs to install the dependencies as they exist on the base branch to properly compare the size-limit results.

Seems like #82 would be a good solution for flexibility and different use cases but I wonder if simply using npm ci instead of npm install would work for standard use cases 🤔

@stazcp
Copy link

stazcp commented Jul 21, 2023

I am still having this issue, it skipped install once and now it doesn't do it anymore.

@beamery-tomht
Copy link

Same here, already installed deps in our job so don't need this auto install - skip_step: build should prevent both install and build but both occur and then runs npx size-limit --json again...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants