Meteor-CI-Tutorial
Meteor-CI-Tutorial copied to clipboard
Tutorial03 Failure
I've been trying to run the tutorial on Ubuntu 18.04. There seem to be a couple places where it breaks down, but I've been able to work through the issues until now.
In Tutorial03 at TinyTest a Module, the script fails to execute meteor test-modules &
in UnitTestAModule_functions.sh.
I think test-modules
is supposed to be defined in the scripts section of ~/${PARENT_DIR}/${PROJECT_NAME}/package.json
, but this is what is in my package.json:
{
"name": "proj1",
"private": true,
"scripts": {
"start": "meteor run",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.51",
"meteor-node-stubs": "^0.4.1"
},
"meteor": {
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
},
"testModule": "tests/main.js"
}
}
meteor &
works great, but meteor test-modules &
fails with the following message:
'test-modules' is not a Meteor command. See 'meteor --help'.
If anyone knows how to test the ${MODULE_NAME}
package in ~/${PARENT_DIR}/modules/${YOUR_UID}
, let me know.
It is a long time since I worked with Meteor, but I believe TinyTest no longer exists.
It looks like the root of the failure is that meteor changed its naming of 'modules' to 'packages'. For instance, Tutorial03_UnitTestAModule\UnitTestAModule_functions.sh(247) tries to execute meteor test-modules &
, but 'test-modules
' is not a valid option in meteor 1.7.0.3. However 'test-packages
' is a valid option, and meteor test-packages &
successfully runs TinyTest.
In the next step of Tutorial03, the ./tests/tinyTests/test-all.sh
script attempts to grep test scripts from the modules subdirectory. But, the structure created by meteor has a packages subdirectory.
I'm guessing there are other places the tutorial scripts will break on the modules --> packages change.
@martinhbramwell , it sounds like TinyTest is deprecated. Is there a different recommended test driver for Meteor CI? What do you use?
I don't want to create confusion since I am very new to the martinhbramwell/Meteor-CI-Tutorial project, and fairly new to Meteor, but the Meteor Guide recommends putting all application code inside the ~/${PARENT_DIR}/${PROJECT_NAME}/imports/
directory. (They also recommend that client/main.js
and server/main.js
are the only code outside imports/
.)
Should these tutorials match that recommendation?
https://guide.meteor.com/structure.html#example-app-structure
I really hate to see you bashing your head against the wall with this repo. Have you not noticed that it is two years old? I no longer work with Meteor at all, and do not intend to put any further effort into this tutorial. In fact it was broken by changes in Meteor, so I gave up.
@martinbramwell, fisrt, thanks for reading and responding on a project that you put aside a couple years ago.
I'm happy to bash and push fixes because this was exactly what I was looking for: A production ready Meteor CI setup.
If you are really not using Meteor at all any more, I hope you can post what setup you are currently using for app development and CI. Do you have a setup that you are happy with?
Can I suggest you confirm that you can, in fact, get all the way through the tutorial, before trying any pull requests? Did you know that CircleCI has dramatically changed their work flow model, for example? The stuff in part 8 to do with Aysnc should be rewritten with promises, right?