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

Adjust the CI to work with monorepo #6477

Closed
mlewand opened this issue Mar 23, 2020 · 6 comments · Fixed by #6605
Closed

Adjust the CI to work with monorepo #6477

mlewand opened this issue Mar 23, 2020 · 6 comments · Fixed by #6605
Assignees
Labels
type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@mlewand
Copy link
Contributor

mlewand commented Mar 23, 2020

Provide a description of the task

CI customization will need to be adapted to work with the monorepo.

Couple of questions already:

  • we need to adjust current continuous integration flow
    • what tests should be run when a PR is submitted / branch pushed? affected packages or entire monorepo test suite?
    • what test should be run once branch is merged to master? affected packages or entire monorepo test suite?
    • should there be cron runs?

📃 Other details

This is a subtask of #6466.

@mlewand mlewand added the type:task This issue reports a chore (non-production change) and other types of "todos". label Mar 23, 2020
@Reinmar Reinmar mentioned this issue Mar 24, 2020
7 tasks
@mlewand mlewand added this to the iteration 31 milestone Mar 25, 2020
@Reinmar
Copy link
Member

Reinmar commented Mar 26, 2020

I'd also consider moving to a different CI service as Travis definitely isn't ideal. I have no experience here, but I hear about CircleCI and GH workflows.

Some links:

@Reinmar
Copy link
Member

Reinmar commented Mar 26, 2020

CircleCI's free tier has 1000 minutes monthly: https://github.com/marketplace/circleci. However, I'm sure that we can consider paid options if need be (AFAICS, we'd need the startup plan which isn't that pricy). Especially that not all the code that we have is open sourced anyway.

You can ping @czerwonkabartosz with some questions.

@czerwonkabartosz
Copy link

Feel free to ask questions about CircleCI. I will try to answer somehow or @morganfree will answer because he already knows the CircleCI better than me (knows the CircleCI API and documentation by heart) ;)

@pomek
Copy link
Member

pomek commented Mar 27, 2020

My proposals about CI flow:

what tests should be run when a PR is submitted / branch pushed? affected packages or entire monorepo test suite?

For PR build – check the coverage of changed packages, execute tests in changed packages, build docs.

For non-master commits: – execute tests in changed packages. At some point, you will create a PR which triggers "PR build" that checks more.

what test should be run once branch is merged to master? affected packages or entire monorepo test suite?

Master commits (push or merge) – all tests with code coverage. Also, docs should be checked.

should there be cron runs?

We're using Cron for publishing nightly docs. So I guess we want to stay with it.


Except for the above, we need to remember:

  • a validator for checking paths (relatives inside a package, "packages imports" across packages)
  • do we need yarn run docs:api --validate-only if we're going to build full documentation?
  • anything else?

Issues:

Code coverage. Since we had problems with memory when running code coverage for the entire repository, we decided to check the cc of a single package in its repository. Now we're going to have monorepo and we need to find a way how to generate CC.

Should we take a risk and generate cc for few packages at the same time (yarn run test -f core,engine,... -c)? At some point, it will crash.

Or call n-times the same command with different values:

yarn run test -f core -c
yarn run test -f engine -c
yarn run test -f ... -c

Unfortunately, I will take some time.

Another problem is our "cc-service" that does not handle monorepo. Coveralls requires a repository on GH in order to start collecting CC.

Maybe Codecov could resolve our problem but after looking on docs, it's a little weird we need to put 50x packages in the config file. OTOH, I didn't go too deep in this topic. Maybe I'm wrong.

@mlewand
Copy link
Contributor Author

mlewand commented Apr 2, 2020

@pomek your proposal looks good to me 👍 although I'd make the cases as similar as possible so non-master builds imho should also run check coverage of changed packages, rather than tests alone.

As for the issues part, we have verified there is no longer an issue with memory when doing code coverage tests. Seems that our recent unit tests memory leaks or tooling upgrade might have fixed that.

I see no problem in manually maintaining codecov file with our subpackages explicitly listed, as long as this is documented :D

@mlewand mlewand assigned mlewand and unassigned pomek Apr 17, 2020
@mlewand mlewand modified the milestones: iteration 31, iteration 32 Apr 22, 2020
@Reinmar Reinmar modified the milestones: iteration 32, iteration 31 May 1, 2020
@Reinmar
Copy link
Member

Reinmar commented May 1, 2020

I moved this back to it31 as a great majority of the work was done already. If you want to have a followup in it32, please report a new ticket.

@mlewand mlewand closed this as completed in 23e5152 May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants