mainmatter / ember-asset-size-action

Comment with the diff for the asset sizes on Pull Request
MIT License
22 stars 15 forks source link

Use `yarn --frozen-lockfile` #7

Closed mydea closed 4 years ago

mydea commented 4 years ago

The default yarn command will potentially update the yarn.lock file, when being run. This is generally not great on CI, but especially problematic here, as it will prevent the second git checkout from working, as it complains that there are modified files that would be overwritten on checkout.

This PR changes this to run yarn --frozen-lockfile, which will always install exactly the dependencies as specified in the yarn.lock file and not try to do anything else, never updating the yarn.lock file.

mansona commented 4 years ago

@mydea I'm wondering if this is something that we should add as a config 🤔 because it now has a divergence between the yarn and the npm implementation.

If you run npm ci and it doesn't have an up-to-date package-lock then it will error.

Thoughts?

mydea commented 4 years ago

That's actually what this command also does ;) so actually it aligns it with the npm command!

mansona commented 4 years ago

Just shows my ignorance of yarn then doesn't it 😂 thanks for the contribution 👍