-
Notifications
You must be signed in to change notification settings - Fork 1.1k
test: build loopback.io submodule to ensure it works with docs #1251
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
Conversation
a47058a to
61ef7c0
Compare
Is there a way to have this done automatically? |
Not that I'm aware of ... but we can write some scripts to automate this locally. (You only need to do this if you want to run the loopback.io submodule locally). |
b-admike
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I've seen how many times we had to go fix up loopback.io after small syntax issues were introduced from our @loopback/docs. The overhead of ~3-5mins sounds reasonable for the peace of mind we will get from this extra stage. If we do decide to go with this, I suggest you write some instructions on how to test locally as you have described in the this PR.
| script: | ||
| - cd loopback.io | ||
| - bundle install | ||
| - npm run fetch-readmes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it knows to run npm install and npm test automatically in this stage right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #1254 for the new PR. npm test is not run in the loopback.io (that's what the test stage is for). install happens as part of bootstrap.
|
Have you evaluated |
|
Maybe we just have to find a simple way to test |
|
@raymondfeng that reminds me, when I was spiking on moving docs, I remember not pursuing git submodules because of how |
|
@raymondfeng Have a look at #1254 I had not evaluated |
|
Closing this in favor of #1254 |
loopback.io has broken multiple times because of formatting errors in
@loopback/docsas jekyll is not able to build the site with invalid syntax in markdown files.This PR introduces loopback.io as a submodule of loopback-next and a Travis Stage is added that attempts to build the loopback.io site. If the build fails, the CI will fail and we can look at the error.
Travis Stages will look as follows: https://travis-ci.org/strongloop/loopback-next/builds/365796133?utm_source=github_status&utm_medium=notification
This also allows us to locally test the changes in docs against a local copy of loopback.io as the bootstrapped repo will link to the local copy of
@loopback/docs. You must initialize theloopback.iosubmodule by running the following command:git submodule update --init --recursiveThen in loopback.io you must run the
fetch-readmesscript and usenpm run startto start the site.CON: Travis CI Builds will take an additional ~3-5 minutes for the new stage.
If we want to go ahead with this PR, the following needs to take place (In loopback.io):
loopback.io/packagae.jsondevDependency on@loopback/docsneeds to be changed fromlatestto*as lerna doesn't play nice withlatest(it installs it from npm instead of local).*will install the latest published version from npm in production and link to local copy in loopback-next.loopback.io/update-lb4-docs.jsRemove the lines that delete the sidebar folder from source (not sure why we are even doing this ... but in the mono-repo after bootstrapping to local it means removing it from our@loopback/docspackage.Checklist
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated