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

chore: always check yarn lock and dedupe during update #12508

Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Dec 15, 2020

Q                       A
Fixed Issues? CI does not bail when yarn.lock needs to be updated
License MIT

Context: In #12433 we modified the package.json of @babel/code-frame but forgot to commit Yarn lock changes. The CI does not bail because the install check is skipped when CI has yarn cache for the yarn.lock. This PR refines the CI step so that it always check whether yarn.lock need to be modified. I catch this issue when my fork fails: https://github.com/JLHwung/babel/runs/1557682750

The CI now bails as expected: https://github.com/babel/babel/runs/1557842082

The following commit fixes this error.

@JLHwung JLHwung added PR: Internal 🏠 A type of pull request used for our changelog categories PR: Fixes failing main labels Dec 15, 2020
@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/35340/

env:
YARN_ENABLE_SCRIPTS: false # disable post-install scripts
YARN_NODE_LINKER: pnp # use pnp linker for better performance: it's meant to update yarn cache only
run: |
yarn dedupe --check
yarn install --immutable
yarn install --immutable --skip-builds
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that since we have run yarn install --immutable --skip-builds unconditionally, GitHub CI now update the cache even if the yarn.lock is not changed and cache was hit. It adds 5 extra seconds to current CI: https://github.com/babel/babel/pull/12508/checks?check_run_id=1557856427#step:13:1

actions/cache#489 will eventually solve this issue.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ef4e92b:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@JLHwung JLHwung merged commit ecbbd9d into babel:main Dec 15, 2020
@JLHwung JLHwung deleted the always-check-yarn-lock-on-prepare-yarn-cache branch December 15, 2020 15:18
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Fixes failing main PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants