Commit Graph

49 Commits

Author SHA1 Message Date
Tim Abbott e9312b921c tests: Disable test-queue-worker-reload test.
This test is low value (it's for testing a very specific feature/bug),
is slow, and apparently flakes in CI occasionally.
2018-06-05 09:24:03 -07:00
Tim Abbott 95f1f1d363 mypy: Remove logic for linecoverage report. 2018-06-01 11:14:32 -07:00
Greg Price 34f4c822cb ci: Cut out commented-out versions of tools/lint calls.
This may or may not be temporary, but either way, the other code is
there in source control, and the "why" of disabling gitlint is the
helpful bit for a comment.
2018-02-01 11:37:00 -08:00
Greg Price 73f682ad7a Slack importer: Disable often-breaking test in CI.
This test randomly fails far too often in Travis -- I think more than
all our other tests combined.  It needs to be fixed before we can ask
everyone to look at build failures it causes.
2018-01-26 15:42:41 -08:00
Greg Price 1a83b32da5 circleci: Skip checking links in documentation for now.
This is fairly often -- though not always! -- failing, with a nasty
failure mode where it takes like 6 minutes to time out.  See
discussion on #7748 (search for "bad link").

Actually, after seeing it happen just now when running
test-documentation on my laptop, on some other link, it occurs to me
that I've seen this before -- it's fairly common in Travis, too.  It's
just that it doesn't actually cause the build to fail :-/, and on
Travis we haven't been paying as close attention to slow builds as we
are on Circle right now.
2018-01-09 10:53:13 -08:00
Umair Khan 7145e6c97b travis: Enable test-queue-worker-reload.
Fixes #1341
2018-01-05 08:24:57 -05:00
Umair Khan c2248a81dc Enable test-run-dev. 2018-01-01 09:42:11 -05:00
Steve Howell 9391f7aa98 quick fix: Turn off git lint for Travis builds.
We may be having problems with git lint, so this is a quick
fix to hopefully get builds working again.
2017-12-27 18:20:18 -05:00
Rhea Parekh 6b32519a71 Slack importer: Add Travis tests. 2017-12-27 07:50:53 -05:00
Greg Price eb650306eb circleci: Disable gitlint for now.
We get the following error (edited slightly):

  Dec 19 06:13:27 commit_messages| An error occurred while executing
    '/usr/bin/git rev-list --max-count=-1 upstream/master..HEAD':
  fatal: ambiguous argument 'upstream/master..HEAD':
    unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

We'll need to adjust the remotes to make `upstream` mean what we expect.
2017-12-18 22:21:49 -08:00
Harshit Bansal 5111aeac41 tools: Rewrite `test-locked-requirements` to be more performant.
This commit modifies `test-locked-requirements` to use some caching
so that we don't need to use the `update-locked-requirements` tool
everytime for checking the validity of locked requirements as it is
slow.

Fixes: #6969.
2017-11-20 15:35:47 -08: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
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
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
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
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
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
Tim Abbott 2215af4b57 docs: Add a bunch of documentation on Travis CI. 2017-06-06 13:39:51 -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
Umair Khan 83dd901ecf Add capitalization checker tool.
Initial rules significantly by modified by tabbott, who also added the
hacky list of excludes that the tool can't handle correctly yet.

Fixes: #3899.
2017-03-09 00:44:57 -08:00
Tim Abbott 63664264b8 test-backend: Disable verbose coverage display. 2017-03-04 22:48:05 -08:00
Tommy Ip c7e33c6c9f optimization: Use Python to test management commands.
The original test was written in shell script which launches a new
django instance for every tests. By doing it in Python, we avoid
the overhead and reduce the test time to <1 second.

Fixes #3620.
2017-02-11 13:48:16 -08:00
Tim Abbott 06cd40d461 travis: Run test-api in Travis CI. 2017-01-25 16:42:17 -08:00
Tim Abbott cd7d8bfbea travis: Add test-help-documentation to CI for real.
75c4e3191d actually only added it to
`test-all`.
2016-12-26 16:17:42 -08:00
Pweaver (Paul Weaver) 059cd1e7aa tests: enable the pep8 linter in travis CI. 2016-11-17 00:11:00 -08:00
K.Kanakhin b248a2c33e docs-test: Check only http 404 error for external links.
- Raise exception only for http 404 error rensponse, for other
  http error codes used logging to notify devs about wrong links.
2016-11-01 21:45:41 -07:00
Tim Abbott 4fe5fc849e travis: Disable test-documentation temporarily. 2016-10-28 11:27:22 -07:00
K.Kanakhin 455301ca13 docs-test: Add documentation test scripts to backend test case.
- Add script to compile documentation build and start crawler
  to check documentation.
- Add documentation test script to backend travis test case.
- Add log level argument to test-documentation script.

Fixes #1492
2016-10-25 11:36:43 -07:00
Tim Abbott dca585fa75 travis: re-disable test-queue-worker-reload.
It seems to still fail sometimes in Travis CI.
2016-08-10 16:43:00 -07:00
Umair Khan 740b5634ac Fix and re-enable test-queue-worker-reload.
It seems that we no longer get the message, 'zerver/lib/actions.py
modified; restarting server', but the server reloads successfully
nonetheless.

Fixes: #1341.
2016-08-10 16:17:23 -07:00
Tim Abbott 226a57d2c8 travis: Disable test-queue-worker-reload temporarily.
It's failing nondetermistically pretty often, and I'd like to cut the
impact to other users' work.
2016-07-22 11:36:52 -07:00
Eklavya Sharma e86539649c Use tools/travis/activate-venv in test suites. 2016-07-19 14:15:35 -07:00
rahuldeve 3ca53df152 Add test for worker queue autoreloading. 2016-06-26 20:12:37 -07:00
Tim Abbott 39a8c82957 travis: Remove verbose coverage report from end of build output. 2016-06-15 15:05:38 -07:00
Tim Abbott 062287d0b0 Coveralls: Add coverage reporting to backend test suite. 2016-06-10 17:20:00 -07:00
Umair Khan 938291a922 Add run-dev.py test to Travis CI test suites.
Fixes #919
2016-06-08 14:10:37 +05:00
Tim Abbott 24fd3bbf55 travis: Test whether migrations are consistent with models.
This should automatically catch mistakes where someone updates the
database models but forgets to generate migrations afterwards.
2016-01-26 20:38:46 -08:00
Tim Abbott 9d75fd33d9 Add new test for management commands running with --help.
This test caught a few bugs where refactoring had made management
commands fail (and would have caught a few more recent ones).

Ideally we'd replace this with a more advanced test that actually
tests that the management command do something useful, but it's a
start.
2015-11-11 21:34:39 -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