Skip to content

ci(workflow): add cache to workflows using actions/setup-node #44897

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

Closed
wants to merge 0 commits into from
Closed

ci(workflow): add cache to workflows using actions/setup-node #44897

wants to merge 0 commits into from

Conversation

oscard0m
Copy link

@oscard0m oscard0m commented Jul 4, 2021

Description

Add cache to workflows using actions/setup-node

Context

setup-node GitHub Action just released a new option to add cache to steps using it.

You can find the details here: https://github.blog/changelog/2021-07-02-github-actions-setup-node-now-supports-dependency-caching/

Fix #44898


🤖 This PR has been generated automatically by this octoherd script, feel free to run it in your GitHub user/org repositories! 💪🏾

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jul 4, 2021
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@RyanCavanaugh RyanCavanaugh requested a review from weswigham July 6, 2021 23:34
@RyanCavanaugh
Copy link
Member

@weswigham I reviewed this and didn't see anything suspicious. Please merge if you like it.

@weswigham
Copy link
Member

First - it'd be super nice if you could split the formatting differences into a separate PR - I can't tell if the whitespace changes are good or bad.

Second - the GH actions build is currently a bit simpler than the DevOps one because it lacked caching - while caching most dependencies is fine, tslint (probably eslint and ts-related plugins nowadays) and typescript in the tree need to be cache-busted explicitly, so we always get the latest nightly of them. The DevOps build (which has caching) accomplishes this by explicitly uninstalling and reinstalling those dependencies after the initial (cached) install. I'm not sure if the node setup action's caching strategy is amenable to this, but we'd want it to do the same if it caches (since if we stop building against nightly tslint/eslint/typescript, we're liable to break the combination of them and not know when).

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

(see above comment)

@oscard0m
Copy link
Author

oscard0m commented Jul 7, 2021

First - it'd be super nice if you could split the formatting differences into a separate PR - I can't tell if the whitespace changes are good or bad.

Second - the GH actions build is currently a bit simpler than the DevOps one because it lacked caching - while caching most dependencies is fine, tslint (probably eslint and ts-related plugins nowadays) and typescript in the tree need to be cache-busted explicitly, so we always get the latest nightly of them. The DevOps build (which has caching) accomplishes this by explicitly uninstalling and reinstalling those dependencies after the initial (cached) install. I'm not sure if the node setup action's caching strategy is amenable to this, but we'd want it to do the same if it caches (since if we stop building against nightly tslint/eslint/typescript, we're liable to break the combination of them and not know when).


GitHub was messing up the indentation differences and I had to create a new PR from scratch... Sorry for the mess but I hope is not a problem 🙏🏽 🙏🏽 🙏🏽 🙏🏽 . This is the new PR: #44924
@weswigham @RyanCavanaugh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

To add cache support for GitHub Actions using setup-node
4 participants