Skip to content

Improve logic for detecting what PR tests to run #2615

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

Merged
merged 4 commits into from
Feb 12, 2020
Merged

Conversation

hsubox76
Copy link
Contributor

This adds detection of other tests that should run:

  1. tests in packages dependent on the changed package(s)
  2. special cases - firestore tests should run on firestore emulator file setup changes

// Add the package itself.
changedPackages[match[1]] = 'direct';
// Add packages that depend on it.
for (const package in depGraph) {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we run tests for depending packages even if changedPackage.scripts.test evaluates to false? something like:

if (changedPackage) {
  if (changedPackage.scripts.test) {
      changedPackages[match[1]] = 'direct';
  }

  for (const package in depGraph) {
  ...
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, fixed.

@hsubox76 hsubox76 merged commit 41132fa into master Feb 12, 2020
@firebase firebase locked and limited conversation to collaborators Mar 14, 2020
@hsubox76 hsubox76 deleted the ch-testdeps branch April 3, 2020 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants