Commit Graph

29 Commits

Author SHA1 Message Date
Tim Abbott 9322371742 travis: Restructure .travis.yml to be more consistent. 2017-02-12 11:06:31 -08:00
K.Kanakhin 7c3ffa6790 travis-ci: add production Python 3 test suite.
- Add production testing to .travis.yml file for PY3 env

Fixes #1710.
2016-10-11 14:19:03 -07:00
Steve Howell 0bdc9fef5c Upgrade caspersjs to version 1.1.3. (w/acrefoot)
(Most of this work was done by acrefoot in an earlier branch.
I took over the branch to fix casper tests that were broken during
the upgrade (which were fixed in a different commit).  I also
made most of the changes to run-casper.)

This also upgrades phantomjs to 2.1.7.

The huge structural change here is that we no longer vendor casperjs
or download phantomjs with our own script.  Instead, we just use
casperjs and phantomjs from npm, via package.json.

Another thing that we do now is run casperjs tests individually, so
that we don't get strange test flakes from test interactions.  (Tests
can still influence each other in terms of changing data, since we
don't yet have code to clear the test database in between tests.)

A lot of this diff is just removing files and obsolete configurations.

The main new piece is in package.json, which causes npm to install the
new version.

Also, run-casper now runs files individually, as mentioned above.

We had vendored casperjs in the past.  I didn't bring over any of our
changes.  Some of the changes were performance-related (primarily
5fd58cf249), so the upgraded version may
be slower in some instances.  (I didn't do much measurement of that,
since most of our slowness when running tests is about the setup
environment, not casper itself.)  Any bug fixes that we may have
implemented in the past were either magically fixed by changes to
casper itself or by improvements we have made in the tests themselves
over the years.

Tim tested the Casper suite on his machine and running the full Casper
test suite is faster than it was before this change (1m30 vs. 1m50),
so we're at least not regressing overall performance.
2016-10-08 12:08:43 -07:00
Umair Khan 406191cbe8 Upload test event log. 2016-09-30 16:49:26 +05:00
Umair Khan 99dbd33488 Upload casper failure images to S3 in Travis.
You need to define the following settings in Travis:
- ARTIFACTS_KEY
- ARTIFACTS_SECRET
- ARTIFACTS_BUCKET
- ARTIFACTS_REGION (if it's other than standard)

Since we are uploading everything to S3 under `var/casper` this commit
will also upload the server.log to S3.

Fixes: #1263, Fixes: #1477
2016-09-27 09:30:18 -07:00
umkay 798e6faa9e provision: Use NVM to install node and npm.
NVM takes a specific node version and installs the node package and
a corresponding compatible npm package.

We use it in a somewhat hackish way to install node/npm globally with
a pinned version, since that's how we actually want to consume node in
our development environment.

Other details:
- Travis CI now is configured to use the version of node installed by
provision; the easiest way to do this was to sabotage the existing node
installation.
- jsdom is upgraded to a current version, which both requires recent
node and also is required for the tests to pass with recent node.
This fixes running the node tests on Xenial.

Fixes #1498.

[tweaked by tabbott]
2016-09-23 14:34:44 -07:00
Tim Abbott 14dc5a73f5 travis: Remove duplicate sudo: required. 2016-09-23 13:48:43 -07:00
Taranjeet Singh b36dfc0395 Store coverage data under var/ tree.
We set the COVERAGE_FILE environment variable which controls the
output file path for the .coverage file produced by python-coverage,
and also move the mypy coverage file to that location as well.
2016-08-25 19:51:53 -07:00
Tim Abbott bb392374b2 travis: unset GEMPATH.
Travis CI support suggested this as the correct solution for some
recent changes in their environment that make ruby segfault.
2016-08-09 11:59:01 -07:00
Eklavya Sharma d745f20b1b Run frontend and backend tests in python3 on Travis. 2016-07-19 14:15:35 -07:00
Eklavya Sharma 158d67e702 Run tools/test-migrations in Travis. 2016-07-11 21:30:32 -07:00
Eklavya Sharma 08a4555e0f Merge mypy and py3k test suites in Travis. 2016-07-11 21:28:01 -07:00
Eklavya Sharma aa68fd1679 Run tools/lint-all on Travis in python 3. 2016-07-08 10:43:48 -07:00
Eklavya Sharma 618410fa1a .travis.yml: Set BOTO_CONFIG to bogus value.
See https://github.com/travis-ci/travis-ci/issues/5246.
2016-07-08 11:38:57 +05:30
Umair Khan 7d3dc5d0b3 Cache npm for Travis CI.
This should speed up all the major Zulip builds in Travis CI.

Fixes #712.
2016-06-15 09:32:50 -07:00
Umair Khan 08045241a7 Cache node_modules in Travis.
Fixes: #712
2016-06-09 14:36:22 -07:00
Reid Barton 0b7852f081 Generate mypy coverage report for travis + coveralls. 2016-06-04 13:01:19 -07:00
Tim Abbott dd40f51fee Add code to clean the venv cache of old venvs. 2016-05-03 15:04:03 -07:00
Tim Abbott 6a335fc090 Travis: Use /srv/zulip-venv-cache cache. 2016-05-03 14:48:21 -07:00
Tim Abbott 9970341ede Fix caching of install-phantomjs library in Travis CI. 2016-05-03 14:48:21 -07:00
Eklavya Sharma c80f699321 Add tools/run-mypy to Travis checks.
Fixes #635.
2016-04-28 10:03:35 -07:00
Tim Abbott bed847e029 travis: Cache the phantomjs package downloads between builds.
This should hopefully fix the issue we've been seeing with
bitbucket.org rejecting connections from Travis CI by not needing to
connect to them.
2016-01-09 15:46:29 -08:00
Allie Jones 4de0325a9d Install node dependencies using npm.
The node packages 'jQuery' and 'jquery' are different--'jQuery' is the
legacy support package that is needed for Zulip so the require statements
in the tests were updated.

Travis uses node 4.0 by default and we are using 0.10, so the command to
install the correct version had to be added to the .travis.yml file.
2015-11-06 09:08:59 -08:00
Tim Abbott f52ffa7923 travis: Add Python 3 compatibility test.
This tests whether a new patch introduces any regressions related to
any of the Python 3 compatibility fixers we've run in the past, so
that we can make continuous forward progress on our path towards
Python 3 compatibility.

This produces error output that looks like this:
"""
Testing for additions of Python 2 patterns we've removed as part of moving towards Python 3 compatibility.

Running Python 3 compatibility test lib2to3.fixes.fix_apply
Running Python 3 compatibility test lib2to3.fixes.fix_except
diff --git a/zerver/views/__init__.py b/zerver/views/__init__.py
index b5c0102..2defd46 100644
--- a/zerver/views/__init__.py
+++ b/zerver/views/__init__.py
@@ -296,7 +296,7 @@ def accounts_register(request):
                 do_activate_user(user_profile)
                 do_change_password(user_profile, password)
                 do_change_full_name(user_profile, full_name)
-            except UserProfile.DoesNotExist, e:
+            except UserProfile.DoesNotExist as e:
                 user_profile = do_create_user(email, password, realm, full_name, short_name,
                                               prereg_user=prereg_user,
                                               newsletter_data={"IP": request.META['REMOTE_ADDR']})

Python 3 compatibility error(s) detected!  See diff above for what you need to change.
"""
2015-11-04 08:00:25 -08:00
Tim Abbott 6eb670097c Expand testing done via Travis CI to cover production pipeline.
With this change, we are now testing the production static asset
pipeline and installation process in a new testing job (and also run
the frontend/backend tests separately).

This means that changes that break the Zulip static asset pipeline or
production installation process are more likely to fail tests.  The
testing is imperfect in that it does not have proper isolation -- we
build a complete Zulip development environment and then install a
Zulip production environment on top of it, so e.g. any apt
dependencies installed for Zulip development will still be available
for the Zulip production environment.  But, it's better than nothing!

A good v2 of this would be to have the production setup process just
install the minimum stuff needed to run `build-release-tarball` and
then uninstall it / clean it up so that we can do a more clear
production installation, but that's more work.
2015-11-01 18:11:39 -08:00
Tim Abbott 6569018de7 Disable apt caching in Travis CI configuration.
Apparently it isn't supposed to work reliably with the container-based
infrastructure that we're using and empirically it's causing build
failures.

Thanks to @mijime for tracking this down.
2015-10-14 10:04:27 -04:00
Tim Abbott 1f2f497cab Unrevert run Zulip tests automatically using Travis CI.
This contains a fix written by nemeth from PR #63 for doing argument
parsing properly.
2015-09-28 09:18:51 -07:00
Luke Faraone 578f769f60 Revert "Run Zulip tests automatically using Travis CI."
Improper list access from `sys.argv` would result in an exception if no
arguments are passed.

This reverts commit d2f5937d89.
2015-09-28 14:33:13 +00:00
Tim Abbott d2f5937d89 Run Zulip tests automatically using Travis CI.
This is a bit hackish in that ideally we'd use proper options parsing
in provision.py, but it works and I even ran the tests 100x for tests
for flakes and didn't get any, so it's definitely an improvement!

With this we'll be both testing the runtime and effectively the Dev VM
setup process, which is awesome; the additional thing I'd want to add
tests for is the production setup process...
2015-09-27 16:29:20 -07:00