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

Cache node_modules in Lint (Docs) #48073

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

ptgott
Copy link
Contributor

@ptgott ptgott commented Oct 29, 2024

The Lint (Docs) GitHub Actions workflow spends the most time installing NodeJS dependencies. Cache these dependencies across workflow runs to reduce runtime. Use the actions/cache workflow and add configuration based on the workflow's documentation for Yarn.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-48073.d3pp5qlev8mo18.amplifyapp.com

@ptgott ptgott force-pushed the paul.gottschling/2024-10-29-node-cache branch 5 times, most recently from 3f2a00e to dd38d43 Compare October 29, 2024 17:55
@ptgott ptgott marked this pull request as ready for review October 29, 2024 17:55
@ptgott ptgott marked this pull request as draft October 29, 2024 17:55
@ptgott ptgott force-pushed the paul.gottschling/2024-10-29-node-cache branch from dd38d43 to afffe64 Compare October 29, 2024 17:58
@ptgott ptgott marked this pull request as ready for review October 29, 2024 17:58
@github-actions github-actions bot requested review from atburke and ryanclark October 29, 2024 17:58
Copy link
Contributor

@codingllama codingllama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bot

@ptgott ptgott added the no-changelog Indicates that a PR does not require a changelog entry label Oct 29, 2024
@ptgott ptgott enabled auto-merge October 29, 2024 19:14
The `Lint (Docs)` GitHub Actions workflow spends the most time
installing NodeJS dependencies. Cache these dependencies across workflow
runs to reduce runtime. Use the `actions/cache` workflow with
`node_modules`. With this approach, `Lint (Docs)` runs go from around
10-11m to around 5 minutes.

This approach caches `node_modules` instead of the the yarn cache, since
yarn needs to build fresh packages even when it copies files from the
yarn cache into node_modules.
@ptgott ptgott force-pushed the paul.gottschling/2024-10-29-node-cache branch from afffe64 to 3232235 Compare October 29, 2024 19:14
@ptgott ptgott added this pull request to the merge queue Oct 29, 2024
Merged via the queue into master with commit 4e12566 Oct 29, 2024
39 checks passed
@ptgott ptgott deleted the paul.gottschling/2024-10-29-node-cache branch October 29, 2024 19:33
@public-teleport-github-review-bot

@ptgott See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Failed
branch/v16 Failed
branch/v17 Failed

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

Successfully merging this pull request may close these issues.

3 participants