Closed bnb closed 4 years ago
@mcollina do you have alternative suggestions that remove the burden of all examples from contributors, focusing on only the example they're contributing to?
how about using https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths to have a difference workflow definition for each example?
onlyChanged
checks since last commit, yes. https://github.com/facebook/jest/blob/317c41372e9461564a9e511c72f547f1e2fd7d7a/packages/jest-changed-files/src/git.ts#L76-L81
(if files are staged, they're not considered to be changed - I haven't decided if that's a bug or a feature...)
changedSince=master
seems more like what you're after to me (or changedSince=origin/master
), based on "focusing on only the example they're contributing to"
(imo it’s a bug, since altho git diff by itself won’t show them, git diff $commitish will)
Agreed @ljharb, landed a change to that effect now
Closing in favor of the approach in #5. Definitely open to further approaches should they arise ❤️
This changes our CI to leverage Jest's
--changedSince
flag over the--onlyChanged
flag since in my local testing it seemed that there were cases in which it only diffed from the previous commit rather than from the base branch (in our case,master
).I could be wrong on this, doing more investigation now, but wanted to get this up as a potential solution.