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

Move to a mono-repo for better testing infrastructure #765

Closed
kiwiupover opened this issue Jul 6, 2020 · 9 comments
Closed

Move to a mono-repo for better testing infrastructure #765

kiwiupover opened this issue Jul 6, 2020 · 9 comments

Comments

@kiwiupover
Copy link
Member

kiwiupover commented Jul 6, 2020

The problems

  • The current test setup needs to run against npm 4 because we are swapping node modules at build time. Both npm 5+ and yarn expect node modules to be referenced from a repository or from disk somewhere. Pre npm 5+ node modules in present in the node_modules would be included when npm install is run.

  • ember-cli-addon-tests builds uses [email protected] ember-cli-fastboot needs to tests against a wide rage of dependancies

  • We need to add tests for an embroider application.

The case for a monorepo

We add test-package applications so we can tests again each of the scenarios ember-cli-fastboot supports. We would add an embroider application and run tests against that app. A number of addons have has success with this approach ember-auto-import being one.

Here we would copy embroider, ember-auto-import and ember-css-modules mono-repo setup so we can test ember-cli-fastboot from real app and addon stand point.

This approach would allow us to have an embroider app as a test-package that we can run tests against. This fixes #754 and many other issues.

Proposed test structure

I propose that we have singular focused tests and a test-package each of those focuses.

  • A classic app with tests for routing and the build tests
  • An embroider app with routing and build tests
  • Custom apps for a customization we support. Finger printing, output files names, custom html

An alternative could be we have a single custom app with all the customization tested in that application. I don't like this idea because it will be hard to fellow contributors to follow the customizations .

Use github actions

This is a no brainer vs travis and appveyor. Test are much faster with github actions.

Here is the same PR on my repo running github actions. kiwiupover#8
I don't know why github actions don't run for a PR from a forked repo. This PR branches from the monoropo PR #767 and should be merged following the merge of that PR.

I broke down package-json-test.js into separate tests with corresponding test-package applications

Adding test-packages for

  • basic-app
  • fingerprinted app
  • custom html app
  • custom output app

Copy embroider, ember-auto-import and ember-css-modules mono-repo setup so we can test ember-cli-fastboot from real app and addon stand point.

This would fix #754 and many other issues.

@kratiahuja @rwjblue, and @SparshithNR thoughts?

Setup monorepo. #767
Monorepo based tests #768

@mansona
Copy link
Member

mansona commented Jul 6, 2020

I feel like we should get the band back together for our weekly meetings to discuss this one!

I personally have a bunch of issues with general moves to monorepos (not that I have much of a say in a decision like this) and I would be curious if we could explore some alternatives before we jump into this with both feet. Also I know that I am probably a bit biased against this (for anyone who has listened to me talk about monorepos) so please feel free too completely ignore me 😂

@kiwiupover
Copy link
Member Author

@mansona what are the alternatives? My three cents is that ember-cli-fastboot not having a modern test harness is holding the project back.

@mansona
Copy link
Member

mansona commented Jul 7, 2020

100% agree on the premise, I'm just talking about discussing some alternatives before making the plunge 😂 what do you think about starting up the weekly meetings again?

@kiwiupover
Copy link
Member Author

@mansona I don’t know of any other alternatives to a monorepo or testing a project like this. I’m all ears for learning something here

@kiwiupover
Copy link
Member Author

A Friday meeting is something I’d be down with.

@kiwiupover
Copy link
Member Author

I have added a PR #768 with a proposed structure for monorepo based tests infrastructure.

@rwjblue
Copy link
Member

rwjblue commented Jul 14, 2020

@kiwiupover - Can you describe what your actually proposing? What things would be included in the monorepo?

@kiwiupover
Copy link
Member Author

@rwjblue I just updated the description of this issue with my thoughts on what is wrong with the current tests setup and why a monorepo would be great for ember-cli-fastboot.

@runspired
Copy link
Contributor

@kiwiupover looks like this can be closed :)

@xg-wang xg-wang closed this as completed Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants