2013-05-14 04:00:22 +04:00
|
|
|
language: node_js
|
|
|
|
|
|
|
|
node_js:
|
2017-01-31 15:19:40 +03:00
|
|
|
- "6"
|
2013-05-14 04:00:22 +04:00
|
|
|
|
2016-04-13 21:52:14 +03:00
|
|
|
dist: trusty
|
2014-04-19 06:05:47 +04:00
|
|
|
|
2015-12-10 18:22:05 +03:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
2016-04-13 21:52:14 +03:00
|
|
|
- mysql-server-5.6
|
|
|
|
- mysql-client-core-5.6
|
|
|
|
- mysql-client-5.6
|
2015-12-10 18:22:05 +03:00
|
|
|
|
2015-09-10 22:45:48 +03:00
|
|
|
env:
|
2015-12-10 18:22:05 +03:00
|
|
|
global:
|
|
|
|
- NODE_ENV=test
|
|
|
|
matrix:
|
|
|
|
- DB=memory
|
|
|
|
- DB=mysql
|
2015-09-10 22:45:48 +03:00
|
|
|
|
2013-05-14 04:00:22 +04:00
|
|
|
notifications:
|
|
|
|
email:
|
2013-12-12 03:39:32 +04:00
|
|
|
- rfkelly@mozilla.com
|
2015-09-10 22:45:48 +03:00
|
|
|
- jrgm@mozilla.com
|
2013-05-14 04:00:22 +04:00
|
|
|
irc:
|
|
|
|
channels:
|
2015-07-01 07:30:04 +03:00
|
|
|
- "irc.mozilla.org#fxa-bots"
|
2013-05-14 04:00:22 +04:00
|
|
|
use_notice: false
|
|
|
|
skip_join: false
|
|
|
|
|
2013-05-17 04:13:01 +04:00
|
|
|
before_install:
|
2014-08-01 00:19:59 +04:00
|
|
|
- npm config set spin false
|
2014-03-26 23:39:25 +04:00
|
|
|
|
|
|
|
script:
|
2015-11-22 08:40:57 +03:00
|
|
|
- if [ $DB == "mysql" ]; then ./scripts/start-travis-auth-db-mysql.sh; fi
|
Make our test suite faster (again) (#1938) r=vladikoff
* test(i18n): cache parsing of po files
When running our remote tests, every time we restarted the server, we
would re-parse all of the po translation files. Each time takes around
500ms. By caching files we've already parsed, this shaves around 12s off
the remote test suite.
* test(dev): make `npm test` faster, provide `npm run test-ci`
Since `npm test` is what we run constantly when working on features, if
we can make it faster, we make development faster.
- Disable memcache. We never specifically start a memcached, but the
tests were running trying to look for it. With the default settings
being to retry once with a 500ms timeout, many test would hang for 1s
checking memcached for data that wasn't even useful to the test. By
setting to 'none', this saved 45s.
- Disable scrypt. scrypt is **slow**. While developing locally, and
running the tests, we don't actually need to test that some value run
through scrypt turns out to be correctly encrypted. By using the
verifier version '0', this saved 55s.
- Disable coverage. Using coverage takes some time to instrument the
code, and spawn in a child process. While nyc is pretty good at caching,
and the slow down isn't that much, it's also more annoying to debug
with. First, it ruins all stack trace lines numbers. Second, it spits a
gigantic coverage report at the end of the test run, requiring scrolling
back up to see the actual test results.
To make sure we still run the test suite with the default options
enabled, this provides a `test-ci` target, that is enabled to be always
be run from TravisCI and Circle.
2017-06-09 22:30:45 +03:00
|
|
|
- COVERALLS_REPO_TOKEN=vKN3jjhAOwxkv9HG0VBX4EYIlWLPwiJ9d npm run test-ci
|
2016-02-19 00:43:22 +03:00
|
|
|
- npm run test-e2e
|
2017-02-22 19:20:47 +03:00
|
|
|
# Test fxa-auth-mailer
|
2017-08-16 05:27:50 +03:00
|
|
|
- grunt templates && git status -s | (! grep 'M lib/senders/templates/')
|
2017-02-22 19:20:47 +03:00
|
|
|
- grunt l10n-extract
|
|
|
|
# NSP check
|
2016-06-21 02:05:10 +03:00
|
|
|
- grunt nsp
|