Skip to content

Use --changedSince for Jest tests in CI #4660

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

Closed
JoshuaKGoldberg opened this issue Mar 9, 2022 · 3 comments
Closed

Use --changedSince for Jest tests in CI #4660

JoshuaKGoldberg opened this issue Mar 9, 2022 · 3 comments
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. repo maintenance things to do with maintenance of the repo, and not with code/docs tests anything to do with testing

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Mar 9, 2022

Overview

Even with SWC replacing Babel (#4583), unit tests on eslint-plugin take several minutes to run. This example took 6m 45s.

It'd be nice if we could use something like Jest's --changedSince against the target branch in a PR to cut down on the number of unnecessary tests run.

Note that this will need to work with Codecov for our test coverage checks.

@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Mar 9, 2022
@JoshuaKGoldberg JoshuaKGoldberg added enhancement New feature or request repo maintenance things to do with maintenance of the repo, and not with code/docs tests anything to do with testing accepting prs Go ahead, send a pull request that resolves this issue labels Mar 9, 2022
@JoshuaKGoldberg JoshuaKGoldberg removed their assignment Aug 19, 2022
@JoshuaKGoldberg
Copy link
Member Author

Removing my assignment because I couldn't get #4611 to work in a short amount of time 😄. This isn't high on my todo list and I likely won't work on it soon. Someone else is more than welcome to!

Note that our test files can sometimes import from unexpected places. For example, docs.test.ts uses fs.readFileSync to read in Markdown files.

@bradzacher
Copy link
Member

One other thing to be careful about here is that I don't believe that jest will detect the inter-package dependencies.

Which means that a change to the parser wouldn't cause all plugin tests to run, even though the change impacts them.

@JoshuaKGoldberg
Copy link
Member Author

In the two years since this was filed, we've had a bunch of great Nx caching work done. Also we're interested in moving to Vitest (#7112). Closing out as non-actionable.

@JoshuaKGoldberg JoshuaKGoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@github-actions github-actions bot added the locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. label Jun 11, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. repo maintenance things to do with maintenance of the repo, and not with code/docs tests anything to do with testing
Projects
None yet
Development

No branches or pull requests

2 participants