JavaScript icon indicating copy to clipboard operation
JavaScript copied to clipboard

tests: only test changed packages

Open defaude opened this issue 2 years ago • 11 comments

Relates to #1193

defaude avatar Oct 15 '22 18:10 defaude

However, having this long-running tests clogs up everyone's workflow and not "just" the CI, therefore I recommend to not just uncommenting the test but rather explicitly skipping it. This way, it's still visible in the console. Finding a solution to the runtime behavior is step 2 - but meanwhile, everyone else can continue working without that delay.

What do you think?

defaude avatar Oct 15 '22 18:10 defaude

We'll have to leave the issue open to find a proper fix eventually however.

appgurueu avatar Oct 15 '22 18:10 appgurueu

Yup! 👍 I mereley mentioned the issue no. in the commit message but didn't close it.

defaude avatar Oct 15 '22 18:10 defaude

Ideally, we would want to run the tests in the changed directories only.

raklaptudirm avatar Oct 16 '22 08:10 raklaptudirm

Jest has an onlyChanged option that I've set up in the pre-commit hook. If that's what you like, we could also switch to that behavior for the CI, as well.

defaude avatar Oct 16 '22 18:10 defaude

That could be great!

raklaptudirm avatar Oct 16 '22 20:10 raklaptudirm

@raklaptudirm I've updated the CI config, as well 👍

defaude avatar Oct 16 '22 20:10 defaude

The pr looks fine, but I had an idea. I think we would want to run all the tests in the master branch, but run tests on only the changed files in the prs. What do you all think?

raklaptudirm avatar Oct 17 '22 14:10 raklaptudirm

I guess I could set that up with GitHub Actions, yeah. But as long as #1193 is not solved, the master build will take forever to complete.

defaude avatar Oct 17 '22 20:10 defaude

I've updated the Workflow accordingly - please take a look 😀

defaude avatar Oct 17 '22 20:10 defaude

I guess I could set that up with GitHub Actions, yeah. But as long as #1193 is not solved, the master build will take forever to complete.

The master build should not be an issue as no one will need to wait for that to complete.

raklaptudirm avatar Oct 19 '22 11:10 raklaptudirm