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

Support only testing components affected by recent git changes #304

Merged
merged 83 commits into from Apr 29, 2021

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Mar 10, 2021

This feature is currently in closed beta.

  • Add --only-changed CLI flag
  • Trace affected story files based on changed git files since baseline
  • Use previous baseline for re-runs
  • Bail if global/config/static files are affected
  • Skip build (early exit) on zero changed files
  • Skip build (mutation) on zero affected story files
  • Rename baselineCommits to parentCommits
  • For --only-changed, retrieve actual baseline commits to determine changed files

@ghengeveld ghengeveld marked this pull request as draft March 10, 2021 23:07
bin/lib/parseArgs.js Outdated Show resolved Hide resolved
bin/lib/parseArgs.js Outdated Show resolved Hide resolved
@ghengeveld ghengeveld marked this pull request as ready for review April 9, 2021 12:45
ghengeveld and others added 2 commits April 9, 2021 14:45
Co-authored-by: Tom Coleman <tom@thesnail.org>
Co-authored-by: Tom Coleman <tom@thesnail.org>
@ghengeveld ghengeveld changed the title [draft] Add --only-changed feature Add --only-changed feature Apr 9, 2021
bin/lib/getOptions.js Outdated Show resolved Hide resolved
bin/tasks/gitInfo.js Outdated Show resolved Hide resolved
scripts/trim-stats-file.js Show resolved Hide resolved
@ghengeveld ghengeveld changed the title Add --only-changed feature Support --only-changes to only test components affected by recent git changes Apr 29, 2021
@ghengeveld ghengeveld changed the title Support --only-changes to only test components affected by recent git changes Support only testing components affected by recent git changes Apr 29, 2021
@ghengeveld ghengeveld merged commit 302f19f into next Apr 29, 2021
@ghengeveld ghengeveld deleted the determine-affected-stories branch April 29, 2021 10:15
app {
baselineBuilds(branch: $branch, parentCommits: $parentCommits) {
number
status
Copy link
Member

Choose a reason for hiding this comment

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

Needs legacy:false!!

Copy link
Member Author

Choose a reason for hiding this comment

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

That is such a gotcha 🤦‍♂️

Copy link
Member

Choose a reason for hiding this comment

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

IKR. I'm not sure what we can do about it, beyond renaming the field entirely.

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.

None yet

3 participants