Testing with source code from other repositories
sosukesuzuki opened this issue · 9 comments
We run the latest Prettier on the other repositories' source code to check for regressions before we release.
like below:
This is hard to do manually, so I want to automate it.
Use a separate repo,
- add
prettier/prettier
and other repositories as submodule. - add GithubActions, when open an issue with specific title(or other events), CI send a PR with formatted code.
What do you think about adding to this repository as a integration test and checking with a CI for each PR?
Will this test fail, if format changed? Or are you thinking about snapshot the result?
Sorry, I was mistaken. I'll try with your suggestion.
I created a repository https://github.com/sosukesuzuki/prettier-regression-testing.
I don't know the way to see diffs of submodules on PR. So, I implemented an action using issue comments for checking diffs. See example issue: sosukesuzuki/prettier-regression-testing#4.
This has only typescript-eslint
as a submodule because work in progress.
Maybe no submodule, git clone
-> git commit
-> run format
-> git commit
?
Hmm, we want to see just diffs. So I think submodule and issue comments is enough. They are also relatively easy to manage.
I don't know how to see submodule diff either.
git clone -> git commit -> run format -> git commit
We can check the second commit to see diff.
I don't know how to see submodule diff either.
sosukesuzuki/prettier-regression-testing#4 (comment)
I'll use it to check regressions in the next release. If we are unhappy with it, you can improve it afterwards.
I close this issue for now.