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

refactor: extract pull-request workflow to multi jobs & restore cache #79

Merged
merged 5 commits into from
May 27, 2023

Conversation

kylemocode
Copy link
Contributor

@kylemocode kylemocode commented May 26, 2023

Why need this change? / Root cause:

  • The original unified workflow has been broken down into multiple jobs: build, test, and lint. Both lint and test jobs are designed to run in parallel once the build job completes. This arrangement offers the benefit of maximizing pipeline execution speed in the future when there are other steps that also depend on the results of the build job.
  • By utilizing the cache action and using the hash values of yarn.lock and the source code (ts, tsx, js, jsx) as the cache keys, theoretically, both lint and test jobs can make use of the cache created during the build step, eliminating the need to reinstall dependencies.
lint (cache hit) test (cache hit)
圖片 圖片
  • also update the key in merge pipeline so that it can utilize the cache create from the pull_request pipeline

Changes made:

Test Scope / Change impact:

Issue

  • TODO: delete the cache in certain branch after merge

@kylemocode kylemocode changed the title [WIP] refactor: extract pull-request workflow to multi jobs & restore cache refactor: extract pull-request workflow to multi jobs & restore cache May 26, 2023
@kylemocode kylemocode requested a review from Parkerhiphop May 26, 2023 15:34
@Parkerhiphop Parkerhiphop merged commit cf49565 into main May 27, 2023
@Parkerhiphop Parkerhiphop deleted the refactor/pull-request-pipeline-refinement branch May 27, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants