Commit Graph

159 Commits

Author SHA1 Message Date
Tim Abbott 054952a44a docs: Update links from codebase to point to ReadTheDocs. 2017-11-16 10:53:49 -08:00
rht 3e258d11e0 Travis: Use travis.yml built-in way to install moreutils. 2017-10-17 09:59:59 -07:00
Harshit Bansal f8b103bd98 tools: Add a test for checking locked requirements.
This commit adds a test to check if the user forgot to run
`tools/update-locked-requirements` after updating dependencies.

Modified by tabbott to disable it by default, since it takes over a
minute to run.

Fixes: #6324.
2017-10-11 22:55:15 -07:00
derAnfaenger 61aebd036f tools: Remove `.py` extensions from user scripts. 2017-10-11 12:52:36 -07:00
Tim Abbott 416f34c80e setup-production: Try to fix Travis failures by blocking mongodb repo.
It appears the mongodb repo is not accessible by Travis CI right now.
This is sadly our problem, because Travis puts a bunch of crap in
their apt `sources.list` file, so `apt-get update` starts failing.
2017-10-08 20:06:42 -07:00
rht dcd80e6650 travis/setup-backend: Remove the '--travis' flag in tools/provision.
Whether the env is Travis or not, this has been detected via $TRAVIS env var.
Proof:
6fbf41bdbc/tools/provision (L38)
2017-10-06 11:20:25 -07:00
Tim Abbott f69523e0c8 travis: Modify success-http-headers.
Travis CI seems to have changed their version of wget such that it no
longer prints this.
2017-10-02 10:35:48 -07:00
Greg Price 103178ffb2 run-mypy: Move "which mypy" noise into --version, and use in Travis.
Printing the version in Travis builds will help in debugging when we
get different results there from locally.  The new `--version` path
also gives us a handy place to put the "what mypy command are we running"
diagnostic, getting it out of the way of normal interactive use.
2017-09-27 12:22:03 -07:00
Umair Khan bd43c447c3 travis: Log the Python version.
This allows us to ascertain the Python version under which we ran the
tests.
2017-09-06 13:48:50 -07:00
Tim Abbott b087886d1c travis: Move i18n and capitalization linters to frontend.
Since these usually result from changes to HTML templates and other
frontend-side things, it seems better to group them with the frontend.

[Tweaked by gnprice in whitespace and comments.]
2017-08-29 15:42:01 -07:00
Tim Abbott 6ef55145f5 travis: Merge the static-analysis build into backend.
[Tweaked by gnprice to leave the use of --linecoverage-report
unmodified for now.]
2017-08-29 15:42:01 -07:00
Brock Whittaker 04888101e2 Replace old portico footer with new sectioned one.
This replaces the old footer that has one section with a small list of
items. This expands the footer to have multiple sections.

Actual content tweaked and tagged for i18n by tabbott.
2017-08-28 11:07:02 -07:00
Robert Hönig 3f01907d3b travis: Distribute linting over frontend and backend suites. 2017-08-27 13:51:06 -07:00
Robert Hönig c5da0ada31 linter: Replace --pep8 with new --frontend/--backend options.
Adds the --frontend and --backend options to replace
--pep8.

Significantly modified by tabbott to use a cleaner framework.
2017-08-27 13:50:53 -07:00
Tim Abbott 8dff14430e tools: Remove old python 3 compatibility checker.
Now that we've migrated over to Python 3, this tool is no longer required.

Fixes #6217.
2017-08-22 14:58:59 -07:00
Greg Price b8dcac1b42 run-mypy: Stop running `mypy --py2`.
Also unconditionally use the `mypy` from our virtualenv --
that's how we ensure we use a common version across different
Zulip developers and in CI.

And as a side effect of cutting some Python 2 vs. Python 3 logic,
fix a bug where `--all` was having no effect.
2017-08-16 17:54:43 -07:00
Greg Price 6346861ccd py3: Cut out the `build-release-tarball --py3` flag.
This is now redundant, as we've applied this transformation to the
source tree itself.
2017-08-16 17:54:43 -07:00
Greg Price d968179e54 py3: Stop running on Python 2 in Travis.
This clears the way to dropping logic in lots of places
for supporting Python 2.
2017-08-16 17:54:43 -07:00
Greg Price 835c2ca1ce travis: Cut /root/zulip out of prod test path, just to be sure.
Our previous dependencies on the `/root/zulip` path should all be
long gone at this point.  Run our production-install test suite through
a fresh temporary path instead, mainly just to avoid causing any confusion
over whether that's quite the case.
2017-08-15 17:41:07 -07:00
Greg Price e469578a55 py3: Fix up (almost) all script invocations to rely on shebangs.
This follows up on 207cf6302 from last year to clean up cases that
have apparently popped up since then.  Invoking the scripts directly
makes a cleaner command line in any case, and moreover is essential
to how we control running a Zulip install as either Python 2 or 3
(soon, how we always ensure it runs as Python 3.)

One exception: we're currently forcing `provision` in dev to run
Python 3, while still running both Python 2 and Python 3 jobs in CI.
We use a non-shebang invocation to do the forcing of Python 3.
2017-08-15 17:30:31 -07:00
Tim Abbott 84da22da67 travis: Improve production test for HTTP success to not check length.
This will make life a lot easier when iterating on the login page.
2017-08-15 10:51:29 -07:00
Jack Zhang b85d3e28ce portico: Update display text for integrations categories dropdown.
Category 'All' -> text 'Filter by category'; icon chevron right when
the dropdown is closed, icon chevron down when the dropdown is open

All other categories -> text CATEGORIES[state.category]; icon chevron down
2017-08-10 10:21:53 -07:00
Tim Abbott 9bbcb712ec travis: Fix content-length test. 2017-08-08 13:22:22 -07:00
Greg Price 360c27dedd tests: Bring all the top-level test scripts into alignment on what to test.
Notably, this adds our checks on translated message strings to
`tools/test-all`, so that they don't cause surprise failures in
CI after a branch is pushed.  (Alternately they could have gone
in `tools/lint` to accomplish the same goal, but `makemessages`
which they depend on is quite slow -- on my machine it takes 7s,
compared to 10s for all of `tools/lint`.)
2017-07-25 15:31:32 -07:00
Greg Price cd7cd73538 tests: Reorder tests in top-level test scripts to agree with each other.
This will make it easier to get the scripts to contain the same set of
tests (with explicit, conscious exceptions), and to keep it that way.
2017-07-25 15:31:32 -07:00
Vaida Plankyte 388acbbfcb frontend: Remove old required div & css from registration pages.
Removes class="required" divs that used to contain an asterisk
for valid/invalid input, and their associated css.
2017-07-25 13:39:34 -07:00
Jack Zhang 1c9426fdce registration: Divide form into user and org sections. 2017-07-21 13:09:06 -07:00
Tim Abbott 29c5913bb8 travis: Update success-http-headers. 2017-07-17 16:41:50 -07:00
Tim Abbott 344af2a7c9 travis: Use a wrapper script for installing moreutils.
This works around a frequent problem we've been having with Travis
CI's apt repository being busted on startup.  This, in turn, caused
`apt-get install moreutils` to fail.

We attempt to fix this by adding our own retry logic.
2017-07-12 13:43:47 -07:00
Brock Whittaker bd664b0dd5 portico: Fix background color; remove need for bg-image classes. 2017-07-07 15:30:47 -07:00
Jack Zhang c5cdede891 portico-css: Reposition header, portico-page content, and footer. 2017-07-07 15:29:43 -07:00
Umair Khan ca14292334 travis: Only generate translatation files once.
This should save us a second or two in Travis builds.
2017-07-03 10:10:43 -04:00
Umair Khan 74d83cc47e lint: Disallow handlebars within {{#tr}}{{/tr}}.
This commit adds a new linter which runs from tools/travis/backend.
It runs over the translations.json file and checks if any of the
translatable string contains handlebars in it.

Fixes #5544
2017-06-30 10:12:31 -04:00
Rishi Gupta 85d38bd17b emails: Remove DEFAULT_FROM_EMAIL from prod_settings_template. 2017-06-29 17:54:33 -07:00
Aditya Bansal 18eeb962fe setup-static-analysis: Add wrapper to retry dependancy installation. 2017-06-23 08:23:45 -04:00
Harshit Bansal 0b03fd97a2 webpack: Don't include katex bundle in base.html.
Since we use katex only in the main webapp, we don't need it in things
like landing page etc, so it is better to move it to index.html.
2017-06-22 19:06:32 -04:00
Harshit Bansal c50b3672c2 webpack: Migrate `signup.js` bundle to webpack static asset pipeline. 2017-06-20 09:45:26 -04:00
Aditya Bansal b19134d4c2 travis: Remove docker-engine from held package list in production.
We are doing this in order to avoid facing troubles when travis
updates its trusty images. Here is a link to the blog post.
https://blog.travis-ci.com/2017-06-19-trusty-updates-2017-Q2
2017-06-20 06:45:40 -04:00
Aditya Bansal 7980462010 setup-backend: Add wrapper to retry provisioning in case it fails.
In this commit we add a wrapper around the provisioning inside
setup-backend to trigger another try at provisioning if it fails
in hopes of it will run this time fine if it was interuppted by a
network issue the first time.
Fixes: #2034.
2017-06-19 16:14:11 -04:00
Aditya Bansal 924d8266c0 setup-production: Add a wrapper to retry provisioning when it fails.
In this commit we basically add a wrapper around provisioning
inside setup-production to trigger a retry in case of failure.
2017-06-19 16:14:11 -04:00
Aditya Bansal fab4a30cce production-helper: Add wrapper to retry apt-get dist-upgrade.
In this commit we add a conditional inside production helper to just
re run apt-get dist-upgrade in case it fails the first time.
2017-06-19 16:14:11 -04:00
Umair Khan eeabc0f6a3 Django 1.11: Bump Django version to 1.11.
This commit also makes the following changes:

* Bumps the version of Django to 1.11.2.

* Fixes the HTTP response headers. Now CommonMiddleware sets Content-Length
  header for non-streaming response, see
  https://docs.djangoproject.com/en/1.11/ref/middleware/#module-django.middleware.common.
  Due to this, 'Transfer-Encoding: chunked' header is removed, which signifies
  a streaming response.
2017-06-15 14:44:38 -07:00
Aditya Bansal 8e33d9e48b travis: Update held packages list in production tests. 2017-06-13 11:12:26 -07:00
Joshua Pan fdb244fd3b node tests: Add support for enforcing 100% test coverage.
Fixes #5178.
2017-06-07 22:13:02 -07:00
Tim Abbott 2215af4b57 docs: Add a bunch of documentation on Travis CI. 2017-06-06 13:39:51 -07:00
Aditya Bansal 23baaae980 travis: Stop deleting npm cache in production tests.
Now that we're not using the copy_modules functionality (basically
because including node_modules in production tarballs was a huge disk
sink), the production Zulip code isn't using `zulip-npm-cache` anyway.
And deleting that cache had a huge impact on the performance of the
development environment provisioning that we do as part of this suite.

Commit message rewritten by tabbott.
2017-06-03 15:29:08 -07:00
Cynthia Lin 0600e1eb30 tools: Add optimize-svg tool for checking for unoptimized SVG files. 2017-05-30 11:15:56 -07:00
Joshua Pan 64984f5bf4 Rename tools/lint-all to tools/lint.
Fixes #4574.
2017-04-21 14:57:47 -07:00
Tim Abbott 5db3f60c7d travis: Temporarily disable failing Nagios tests.
Apparently Travis CI has a very strange issue today that causes our
Nagios/E2E tests to have Tornado failing to connect to RabbitMQ.
Causes unknown, but I've spent a day trying to debug this without
luck, and we need our test suites passing in the meantime.
2017-03-15 22:01:04 -07:00
Tim Abbott 4ac5da7860 travis: Run test-tools in Travis CI backend suite. 2017-03-09 20:21:13 -08:00