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

Run npm ci when a lockfile is available #37

Merged
merged 2 commits into from
Jan 5, 2022
Merged

Run npm ci when a lockfile is available #37

merged 2 commits into from
Jan 5, 2022

Conversation

dominykas
Copy link
Member

@dominykas dominykas commented Jan 2, 2022

Closes #8.

Doing this as a separate step, because I'd like to keep the default shell (Powershell on Windows) for the actual install step (I suspect we'll have to make it configurable, but that's out of scope here - will wait for someone to ask for that).

Test runs:

@dominykas dominykas added the enhancement New feature or request label Jan 2, 2022
then
echo "::set-output name=install-command::npm ci"
else
echo "::set-output name=install-command::npm install"
Copy link
Contributor

Choose a reason for hiding this comment

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

What about yarn.lock?

Copy link
Member Author

Choose a reason for hiding this comment

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

yarn support not yet implemented - #6 - it needs a little bit more thought.

Copy link
Member

Choose a reason for hiding this comment

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

npm install and npm ci both read yarn.lock automatically in npm 7+.

Copy link
Member Author

Choose a reason for hiding this comment

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

You think we should run npm ci when yarn.lock is present (until #6 is done)?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that would make the most sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

npm supports this as of v7+ and it is a better option than `npm install` until #6 is implemented
@dominykas dominykas merged commit 52a3594 into main Jan 5, 2022
@dominykas dominykas deleted the use-npm-ci branch January 5, 2022 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run npm ci when a lockfile present
3 participants