Skip to content

Commit

Permalink
skip the install step
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Feb 15, 2024
1 parent 89ec81e commit 78916ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/example-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: npm install chalk
# look at fast this action installs a single dependency
- uses: bahmutov/npm-install@performance
with:
working-directory: examples/basic
install-command: 'npm install chalk'
cache-key-prefix: chalk3
cache-key-prefix: chalk4
env:
ACTIONS_STEP_DEBUG: true

Expand Down
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ const installInOneFolder = ({
}

return api.utils.restoreCachedNpm(NPM_CACHE).then(npmCacheHit => {
return api.utils.install(opts).then(() => {
// return api.utils.install(opts).then(() => {
return Promise.resolve().then(() => {
if (npmCacheHit) {
return
}
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ const installInOneFolder = ({
}

return api.utils.restoreCachedNpm(NPM_CACHE).then(npmCacheHit => {
return api.utils.install(opts).then(() => {
// return api.utils.install(opts).then(() => {
return Promise.resolve().then(() => {
if (npmCacheHit) {
return
}
Expand Down

0 comments on commit 78916ad

Please sign in to comment.