Skip to content
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

Testing with source code from other repositories #9290

Closed
sosukesuzuki opened this issue Sep 29, 2020 · 9 comments
Closed

Testing with source code from other repositories #9290

sosukesuzuki opened this issue Sep 29, 2020 · 9 comments
Assignees
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:tests Issues about tests that are not correct, should be added, or similar

Comments

@sosukesuzuki
Copy link
Member

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.

@sosukesuzuki sosukesuzuki added the type:tests Issues about tests that are not correct, should be added, or similar label Sep 29, 2020
@sosukesuzuki sosukesuzuki self-assigned this Sep 29, 2020
@fisker
Copy link
Member

fisker commented Sep 29, 2020

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.

@sosukesuzuki
Copy link
Member Author

sosukesuzuki commented Sep 29, 2020

What do you think about adding to this repository as a integration test and checking with a CI for each PR?

@fisker
Copy link
Member

fisker commented Sep 29, 2020

Will this test fail, if format changed? Or are you thinking about snapshot the result?

@sosukesuzuki
Copy link
Member Author

Sorry, I was mistaken. I'll try with your suggestion.

@sosukesuzuki
Copy link
Member Author

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.

@fisker
Copy link
Member

fisker commented Oct 1, 2020

Maybe no submodule, git clone -> git commit -> run format -> git commit?

@sosukesuzuki
Copy link
Member Author

Hmm, we want to see just diffs. So I think submodule and issue comments is enough. They are also relatively easy to manage.

@fisker
Copy link
Member

fisker commented Oct 1, 2020

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.

@sosukesuzuki
Copy link
Member Author

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.

@github-actions github-actions bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Dec 31, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:tests Issues about tests that are not correct, should be added, or similar
Projects
None yet
Development

No branches or pull requests

2 participants