Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

improve and speedup circle ci setup #164

Merged
merged 2 commits into from
Jul 18, 2016

Conversation

DominikGuzei
Copy link
Contributor

Fixes the CircleCi tests and improves performance by caching all important parts of the application and test dependencies.

The chimp script is moved outside of the package.json file because i ran into several issues with chimp and Node.js 0.10.x that Meteor is using. So the problem is that if you run Node via meteor npm run you are forced to the Meteor node version. if you run it from outside you can have Node.js 5+ installed globally and basically run Meteor and chimp with different versions.

Here are the related Github issues and discussions:
xolvio/chimp#204
xolvio/chimp#201

Bottom line: Meteor really has to upgrade to use up-to-date Node.js versions soon. Until then, we cannot use the package.json with chimp.

This also removes the unit and app-tests from the CircleCi run since they fail for me. Probably i should also fix these but i do not have enough time at the moment 😢

@tmeasday
Copy link
Contributor

tmeasday commented Jul 18, 2016

Let's do it!

@tmeasday tmeasday merged commit ec811c5 into meteor:master Jul 18, 2016
@tmeasday
Copy link
Contributor

Thanks @DominikGuzei !

} else {
// DEV mode -> watch
startTestApp(startChimpWatch, {
MONGO_URL: 'mongodb://localhost:3001/chimp_db'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is causing errors for me when I run ./tests/acceptance_run or ./tests/acceptance_watch. If I comment it out, the tests run fine.

Any ideas?

W20160802-13:09:00.524(-7)? (STDERR)
W20160802-13:09:00.525(-7)? (STDERR) /Users/noah/.meteor/packages/meteor-tool/.1.3.4_4.l7vwzg++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:313
W20160802-13:09:00.525(-7)? (STDERR)                        throw(ex);
W20160802-13:09:00.525(-7)? (STDERR)                              ^
W20160802-13:09:00.676(-7)? (STDERR) Error: failed to connect to [localhost:3001]
W20160802-13:09:00.676(-7)? (STDERR)     at Object.Future.wait (/Users/noah/.meteor/packages/meteor-tool/.1.3.4_4.l7vwzg++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:449:15)
W20160802-13:09:00.676(-7)? (STDERR)     at new MongoConnection (packages/mongo/mongo_driver.js:213:27)
W20160802-13:09:00.677(-7)? (STDERR)     at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
W20160802-13:09:00.677(-7)? (STDERR)     at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
W20160802-13:09:00.678(-7)? (STDERR)     at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
W20160802-13:09:00.678(-7)? (STDERR)     at new Mongo.Collection (packages/mongo/collection.js:103:40)
W20160802-13:09:00.678(-7)? (STDERR)     at AccountsServer.AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
W20160802-13:09:00.678(-7)? (STDERR)     at new AccountsServer (packages/accounts-base/accounts_server.js:18:5)
W20160802-13:09:00.678(-7)? (STDERR)     at meteorInstall.node_modules.meteor.accounts-base.server_main.js (packages/accounts-base/server_main.js:9:12)
W20160802-13:09:00.679(-7)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
W20160802-13:09:00.679(-7)? (STDERR)     - - - - -
W20160802-13:09:00.679(-7)? (STDERR)     at [object Object].<anonymous> (/Users/noah/.meteor/packages/npm-mongo/.1.4.45.1n9eimd++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/server.js:556:74)
W20160802-13:09:00.679(-7)? (STDERR)     at [object Object].emit (events.js:106:17)
W20160802-13:09:00.679(-7)? (STDERR)     at [object Object].<anonymous> (/Users/noah/.meteor/packages/npm-mongo/.1.4.45.1n9eimd++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15)
W20160802-13:09:00.680(-7)? (STDERR)     at [object Object].emit (events.js:98:17)
W20160802-13:09:00.680(-7)? (STDERR)     at Socket.<anonymous> (/Users/noah/.meteor/packages/npm-mongo/.1.4.45.1n9eimd++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10)
W20160802-13:09:00.680(-7)? (STDERR)     at Socket.emit (events.js:95:17)
W20160802-13:09:00.680(-7)? (STDERR)     at net.js:441:14
W20160802-13:09:00.681(-7)? (STDERR)     at process._tickCallback (node.js:458:13)

Copy link
Contributor Author

@DominikGuzei DominikGuzei Aug 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you run the tests locally on your machine, you have to start the "normal" app first – this is done because otherwise the testing environment would override your local DB everytime. What we do here is this: the normal app is started and then the testing app uses the special Meteor MongoDB server to setup a chimp_db on the same mongo instance. This simplifies the setup because you do not need to have a standalone mongo installed and setup correctly locally.

So do this:
meteor

wait until the app runs, then in a different terminal:
./tests/acceptance_run or ./tests/acceptance_watch

@noahsw
Copy link

noahsw commented Aug 2, 2016

Looking at the output of CircleCI, it looks like this isn't running any tests. Am I missing something?

https://circleci.com/gh/meteor/todos/271

./tests/acceptance_run
[[[[[ ~/todos ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Started your app.
Test app is running …

=> App running at: http://localhost:3100/

[chimp] Running...


  0 passing (4ms)

Chimp CI exited with code 0

@DominikGuzei
Copy link
Contributor Author

@noahsw the problem of no running CI tests is fixed in #171 😉 thanks for the feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants