Commit graph

16 commits

Author SHA1 Message Date
Jérémie Astori 9c4ea85041 Instrument client code before running tests
Despite being a bit gross to look at, this brings a few advantages:

- Tests are now closer to what actually runs, so more likely to find broken stuff.
- We can start using things that were so far Webpack-only or browser-only, like ES6 imports, loading Handlebars templates, etc.
- We open ourselves to browser testing (there is some work to do, but that would be a necessary step).
- We improve the client/server separation, by making it possible to run them independently

I do some extra steps around coverage: now we have 2 reports (client + server), so I have an extra step to combine them (the `nyc report` part). This is  strictly to keep feature parity (the coverage report of this code is effectively the same as before), but in the near future, we might want to keep both reports separate, for example to continue separating client/server. Another reason would be to use something like Codecov, which I believe has the ability to have multiple reports. This is down the road though, our coverage is not good enough to make hosting them somewhere be useful (I think).

A few extras with this commit:

- Coverage summary is displayed when tests are run (this is not slowing down tests)
- Tests check for leaks (see https://mochajs.org/#--check-leaks)
- Tests now output with the `dot` reporter. This is nice as `npm test` runs in parallel, the whole output holds in a few lines instead of spanning over multiple screens.
2018-02-20 15:32:30 +02:00
Pavel Djundik f646fbbd4f Add yarn.lock, update CI services to run yarn 2018-02-20 11:28:14 +02:00
Jérémie Astori c432ee431d Switch to Node v6 as the oldest version we support
Removed a deprecation notice I added in an earlier commit (ef1c59072c).
2018-02-19 18:30:00 +02:00
Pavel Djundik 934400f5ee Do not build feature branch with open pull requests on AppVeyor
Ref: https://github.com/appveyor/ci/issues/882
2017-04-22 16:04:18 +03:00
Jérémie Astori 552fa3fae8 Make and document npm run build now a mandatory step of the install/build setup
This has several reasons, benefits and consequences:

- When running on root (which is not recommended anyway), `npm run build` was already necessary.
- This allows to not use the `prepublish` hook, whose behavior is going to change in npm v5 and again in npm v6.
- This allows to create both production and development builds when running from source.
- It makes `npm run build` compatible with Windows again for development environments (lost in previous commit).
- It uses the `prepublishOnly` hook added in npm v4. Since this hook is not available prior to that, deployment to npm from Travis has to be done on the Node.js v7 environment.
2017-01-23 01:15:50 -05:00
IlyaFinkelshteyn 8d31a0b312 Invalidate cache and use appveyor-retry with npm
Return cache but invalidate it when needed

Add appveyor-retry

Remove spaces
2016-11-25 19:43:24 -08:00
Pavel Djundik d6545fd307 Remove appveyor cache 2016-11-20 09:43:08 +02:00
Jérémie Astori 79e20c83d5 Fix AppVeyor cache never being successfully built
Oh that wonderful Windows world...
2016-10-17 01:41:14 -04:00
Jérémie Astori 6dac7b1897 Use CI caches for downloaded files instead of installed ones
This allows for a more meaningful build: if a newer version of a sub-package breaks,
builds would still pass as it uses the cached version. This uses a cache for downloaded packages instead.

I am expecting this to slow down a little bit the builds (but we are OK overall)
but be more accurate in practice.

See https://docs.npmjs.com/cli/cache#configuration and https://docs.npmjs.com/files/folders#node-modules.
2016-10-11 22:30:08 -04:00
Pavel Djundik 32ee527ea5 Do not cache npm-cache folder on appveyor 2016-06-13 22:34:34 +03:00
Pavel Djundik 8addd5a8bc Upload appveyor test results 2016-06-07 17:41:24 +03:00
William Boman 1d088de974 ci: remove extraneous scripts 2016-06-06 18:46:31 +02:00
Pavel Djundik e3e5c48f0b Cache npm modules on appveyor
https://www.appveyor.com/docs/build-cache#configuring-cache-items
2016-06-05 11:21:45 +03:00
Jérémie Astori 308ac9404e Make sure npm test script gets run on AppVeyor 2016-05-31 21:19:43 -04:00
Pavel Djundik 327064b5ee Run appveyor tests individually, just like on travis
Fixes failing builds being marked as successful
2016-06-01 00:36:39 +03:00
Jérémie Astori c886657e6b Add AppVeyor configuration file 2016-05-31 04:42:35 -04:00