Граф коммитов

175 Коммитов

Автор SHA1 Сообщение Дата
Armen Zambrano deaf8c850c Bug 1169263 - Switch from Vagrant to docker-compose (#4901)
* Change permissions for docker/entrypoint.sh
* Allow using Django in localhost
* Documentation changes
Allow running shellcheck tests
Use docker-compose for the Selenium tests
Install docs updates
Switch to yarn cache instead of npm
Install UI dependencies
* Add ability to override DATABASE_URL and use a .env file
2019-05-16 14:56:02 -07:00
Sarah Clements 89900be7d9 change node version back to 11 in travis.yml file 2019-03-28 17:54:33 -07:00
Sarah Clements 6127d1134f update node version in travis.yml file 2019-03-15 17:44:45 -07:00
Ed Morley 6945c4c471
Bug 1165259 - Add infrastructure documentation (#4766)
- Adds a new "infrastructure" section to the docs, which describes
  architecture, administration and troubleshooting (fixes bug 1165259).
- Adds code comments to any deployment-related files in the repository.
- Adds documentation for the various ways in which users can access
  Treeherder data (fixes bug 1335172).
- Reorganises the structure of some of the existing non-infrastructure
  docs, to make the documentation easier to navigate.
2019-03-11 21:39:34 +00:00
Sarah Clements 6761c341e6
Make travis use same node version as package.json (#4762)
Ensure node versions for package.json and travis.yml are the same by adding renovate support
2019-03-06 14:08:33 -08:00
Ed Morley 39ba1395ff
Bug 1529243 - Update Python from 3.6 to 3.7 (#4723)
Now possible since Celery/Kombu have been updated in #4722 to version
that are compatible with Python 3.7.

Notable changes:
https://docs.python.org/3/whatsnew/3.7.html
2019-02-28 20:24:02 +00:00
Ed Morley a0d1f5fccf
Bug 1330474 - Travis: Stop testing against Python 2 (#4675)
Since we've been using Python 3 in production for long enough that we're
confident we won't need to roll back to Python 2.
2019-02-25 06:54:46 +00:00
Ed Morley ff2993d2fb
Bug 1330474 - Switch from Python 2.7 to Python 3.6 (#4668)
This makes Heroku/Vagrant use Python 3.6.8 instead of Python 2.7, and
inverts the versions used in the Travis testing matrix - leaving all
unit tests running against Python 2.7 to make it easier to roll back
if needs be. The Vagrant provision script and Heroku Python buildpack will
automatically detect the changed Python version and purge the existing
installation/site-packages prior to installing the new version.

We're using Python 3.6 rather than 3.7, since latest Celery/Kombu do not
yet support Python 3.7 (and we're on an older version anyway; bug 1337717).
Bug 1529243 is filed for updating to Python 3.7 later.
2019-02-21 07:38:24 +00:00
Ed Morley 54fb828ae7
Bug 1528601 - Surface 'BytesWarning's and make them fail the tests (#4655)
Invalid comparisons between bytes and strings will now cause the tests
to fail, making it easier to spot bugs that would appear under Python 3.

If there are any false positives in the future, the errors can be
suppressed using `filterwarnings` in `setup.cfg`.

See:
https://docs.python.org/3.6/using/cmdline.html#cmdoption-b
https://docs.python.org/3.6/library/exceptions.html#BytesWarning
2019-02-20 06:47:39 +00:00
Ed Morley ff26a140ee
Bug 1527020 - Travis: Use Python 3.6.8 instead of 3.7.2 (#4630)
Since Celery/kombu don't yet support Python 3.7:
https://github.com/celery/celery/issues/4500

This isn't seen in tests due to bug 1349362.
2019-02-12 16:43:46 +00:00
Cameron Dawson deb71d65e0 Bug 1364045 - Convert all unit tests to Jest (#4603)
Also remove all Karma support and update the docs to only mention ``Jest``.

One of the test files was testing some AngularJS filters. I converted these
tests to test the equivalent helper functions.
2019-02-12 07:49:50 +00:00
Ed Morley 7060eef007
Bug 1527020 - Travis: Enable unit tests under Python 3 (#4619)
To help prevent regressions whilst the remaining xfailed tests are fixed.
2019-02-11 20:31:20 +00:00
Ed Morley 65287fed30
Bug 1466084 - Docs: Switch to MkDocs and Material theme (#4565)
Switches from Sphinx to MkDocs, since it:
* supports Markdown natively without requiring hacks like `eval_rst`
* validates inline links, ensuring that they are not broken
* has a more pleasant live-reloading dev-server
* supports the nicer looking mkdocs-material theme
* is a third of the size of Sphinx (including deps)

The theme change is now possible since Read the Docs have just started
supporting use of custom themes (previously they would override the theme
and use `readthedocs` theme regardless).
2019-02-06 19:34:08 +00:00
Ed Morley 96fb922072 Bug 1522101 - Use Prettier to format YAML 2019-01-23 20:19:04 +00:00
Ed Morley e583700cb1 Bug 1522101 - Use `prettier --check` to validate formatting
Currently Prettier is used via the ESLint integration, which only supports
JS/JSX and not the other filetypes Prettier is able to format.

For now these additional filetypes are excluded by `.prettierignore`
entries, however these will be removed/fixes applied in later commits.
2019-01-23 20:19:04 +00:00
Ed Morley 4a6095784c
Travis: Remove deprecated `sudo` option (#4253)
Since all jobs are now being run on the GCE infra now, regardless of
what the option is set to:
https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures
2018-11-09 14:53:38 +00:00
Ed Morley 565ae4c13e
Bug 1364894 - Upgrade from Neutrino 4 to 9 (#4216)
Neutrino controls our frontend linting, transpilation, source-maps,
testing, dev-server and optimisation of production builds.

Highlights of the upgrade are:

* Major version updates to the individual tools within (such as webpack,
  Babel and ESLint), significantly improving performance, fixing
  transpilation/minification correctness bugs, adding support for newer
  ECMAScript features, and increasing linter coverage.
* Hot reloading in the dev server now works for all entry-points and not
  just the jobs view, shortening the feedback cycle.
* Reduced bundle size due to webpack 4's tree shaking, scope hoisting,
  automatic shared/vendor code chunk splitting (no need for the manually
  maintained 'vendor' list).
* CSS is now extracted out of JS, which improves performance, reduces
  bundle size and prevents the initial white flash of un-styled content.
* Support for dynamic imports/code splitting (needed for bug 1502192).
* Support for Jest via a new Jest preset (unblocks bug 1364045).
* Support for public class field declarations (unblocks bug 1480166).
* Improved source-maps (increases the quality of production exception
  trace-backs and fixes several debugger breakpoint bugs).
* Reduced amount of custom configuration required for our fairly complex
  frontend needs, reducing maintenance burden and allowing for easier
  future Neutrino upgrades.

In addition this PR:

* Fixes the WhiteNoise `immutable_file_test()` regex, so that it now
  correctly enables browser caching of images, fonts and source maps.
* Enables webpack-dev-server's overlay feature, which displays any
  compilation errors in the browser, saving having to switch back
  to the console (this can be enabled for warnings too if desired).
* Enables webpack-dev-server's automatic browser-opening feature,
  which saves having to manually navigate to `localhost:5000` after
  running `yarn start`.
* Switches Karma tests to run Firefox in headless mode, reducing the
  workflow disruption when running `yarn test`.
* Uses the new webpack `performance` option to enable maximum asset
  file size thresholds, to help prevent bundle-size regressions.
* Rewrites the `package.json` script commands so that they now work
  correctly on Windows, even when setting environment variables.

Performance comparison:

* Local `yarn build`:
  - Cached: 2m34s -> 23s
  - Uncached: 2m34s -> 58s
* Local `yarn start`:
  - Cached: 34.5s -> 13.6s
  - Uncached: 34.5s -> 31.3s
* Local `yarn test`
  - Cached: 61.5s -> 19.8s
  - Uncached: 61.5s -> 22.0s
* Local `yarn lint`
  - Cached: 3.8s -> 1.8s
  - Uncached: 13.7s -> 13.4s
* Travis end-to-end time:
  9 minutes -> 6 minutes
* Heroku deploy end-to-end time:
  14 minutes -> 9 minutes
2018-11-02 18:48:28 +00:00
Ed Morley 4ee2cd77c5
Bug 1502290 - Update to Node.js 11 (#4193)
https://nodejs.org/en/blog/release/v11.0.0/
2018-10-29 10:45:05 +00:00
Ed Morley 1f3908a4ed Bug 1495520 - Travis: Re-order job matrix/adjust naming
The Python 3 sub-job runs more than just linters, so the old name
was not correct. The comments have been removed since they mostly
duplicate the name in `env`.
2018-10-01 21:30:39 +01:00
Ed Morley ac28d21305 Bug 1495520 - Travis: Switch Python 3 job to GCE infrastructure
Since we need MySQL to be running, and it's no longer started by
default in the non-GCE Docker images:
https://github.com/travis-ci/travis-cookbooks/pull/988#issuecomment-425995190
2018-10-01 21:30:39 +01:00
Ed Morley ae0f12f5ba
Bug 1478344 - Travis: Switch from Ubuntu 14.04 to 16.04 (#3826)
* Adds a `rabbitmq-server` install step, since it's no longer
  installed in the image by default.
* Removes the MySQL 5.7 install step, since Ubuntu 16.04's default
  MySQL is now 5.7 rather than 5.6.
* Adjusts which services are manually started to account for changes
  in which are enabled by default in the new image.
2018-07-26 14:26:32 +02:00
George Hickman 1cce79f59b Move docs Makefile up to project root and build docs there 2018-07-23 12:58:04 +01:00
Ed Morley b880bcd30a
Bug 1460218 - Update to Node 10 (#3531)
Node.js 10 is the new LTS:
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.1.0

This updates Vagrant, Travis and Heroku (the latter uses the version
from `package.json`) from Node 8.

Travis `yarn build` times are now 15% faster (189s -> 161s).
2018-05-09 11:49:49 +01:00
Ed Morley 8ba5d26a1f
Bug 1458517 - Update to Python 2.7.15 (#3507)
https://github.com/python/cpython/blob/2.7/Misc/NEWS.d/2.7.15rc1.rst
https://github.com/python/cpython/blob/2.7/Misc/NEWS.d/2.7.15.rst
2018-05-03 13:01:21 +01:00
Dave Hunt e63ff9d8bd Migrate test_get_next_results to Travis suite 2018-04-18 13:28:13 +01:00
Ed Morley 023d31885a
Bug 1453850 - Enable Python 2's `-3` mode on Travis (#3444)
This enables `DeprecationWarnings` for things that Python 2 knows
are not compatible with Python 3. The `error` entry in the pytest
`filterwarnings` setting ensures these will be surfaced as Exceptions
and so result in test failures.

See:
https://docs.python.org/2/using/cmdline.html#cmdoption-3

The removal of `sorted()` from `test_bug_job_map_api.py` is to fix:
`DeprecationWarning: dict inequality comparisons not supported in 3.x`
2018-04-13 23:14:36 +01:00
Ed Morley d789f62bf8
Bug 1452904 - Rebalance the Travis test chunks (#3424)
This merges the three separate non-selenium Python test jobs into
one, reducing the overall job count from 7 to 5. This helps avoid
hitting Travis concurrency limits, that delay starting the selenium
job (which is the long pole for the end to end time).
2018-04-10 19:09:05 +01:00
Ed Morley 1a2db1664e Bug 1451774 - Test Django migrations under Python 3 on Travis
The pytest run would normally ensure that the migrations succeed and
that none are missing. However the unit tests currently fail due to
bug 1428362, so this provides equivalent coverage in the meantime.
2018-04-06 15:15:34 +01:00
Ed Morley dd4c0dbec4 Bug 1451518 - Run Django check under Python 3 on Travis
This increases coverage over just running flake8, and provides a
stepping-stone prior to working on making the pytest tests pass too.
2018-04-05 12:07:20 +01:00
Ed Morley 4503f612d5
Travis: Update Python 3 linters job to Python 3.6.5 (#3387)
https://docs.python.org/3.6/whatsnew/changelog.html#python-3-6-5-final
2018-04-03 17:58:21 +01:00
George Hickman 29314ad624 Bug 1428045 - Run flake8 under Python 3 in CI 2018-03-21 11:56:27 +00:00
Ed Morley 8259eb31f1
Travis: Update Python 3 linters job to Python 3.6.4 (#3064)
https://www.python.org/downloads/release/python-364/
2017-12-21 17:12:20 +00:00
Ed Morley aea1155a58
Bug 1423376 - Travis: Skip selenium tests if yarn build failed (#3019)
By design, Travis runs all commands in `scripts` even if earlier ones
fail. However in the case of the selenium tests, they are expected
to fail if `yarn build` failed, so running them regardless only makes
the log output harder to follow. Moving `yarn build` to `before_script`
means the job will instead be aborted prior to running the tests.
2017-12-12 08:51:04 -06:00
Ed Morley e55e58c834 Bug 1420891 - Docs: Test building the docs on Travis 2017-11-28 16:56:45 +00:00
Ed Morley a4b335d286
Bug 1419987 - Always use latest minor version of node.js (#2979)
Since the node minor/patch versions are reliable enough that it's
not worth the hassle of pinning to an exact version. This only
affects Heroku/Travis, since Vagrant was already always using the
latest 8 series release via the APT repo.

This effectively upgrades node on Heroku/Travis from 8.9.0 to 8.9.1,
since it's the latest release at the moment:
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.9.1

The yarn version specifier has been adjusted to use the `.x` format,
which gives the same end result as the caret range, given Heroku
doesn't cache binaries from one build to the next (only `node_modules`).
2017-11-27 16:40:54 +00:00
Dave Hunt 1319f57c55
Rename py.test to pytest #dropthedot 2017-11-09 12:55:25 +00:00
Dave Hunt 9fd3c72241
Bug 1340305 - Allow Selenium tests to be run locally 2017-11-09 12:55:25 +00:00
Ed Morley 9a6c79745f Bug 1414255 - Use shellcheck to validate bash scripts
https://github.com/koalaman/shellcheck

Travis has shellcheck v0.4.6 pre-installed, so we only need to install
it in the Vagrant environment.
2017-11-05 20:53:29 +00:00
Ed Morley 624d2f43a9 Bug 1414094 - Travis: Move setup steps to a reusable script
This:
* reduces duplication
* opens the door to sharing functionality with `vagrant/setup.sh`
* will make it easier to visualise the Travis bootstrap process
  when moving both Travis and Vagrant to a unified Docker environment.
2017-11-03 12:01:26 +00:00
Ed Morley 704c2ece36 Bug 1414094 - Travis: Remove unnecessary comment 2017-11-03 12:01:26 +00:00
Ed Morley 46e3d177ba Bug 1414094 - Travis: Use $HOME rather than tilde
https://stackoverflow.com/questions/5930671/why-use-home-over-tilde-in-a-shell-script
2017-11-03 12:01:26 +00:00
Ed Morley 98e4b90727 Bug 1414094 - Travis: Update the Python 3 job from 3.6.2 to 3.6.3 2017-11-03 12:01:26 +00:00
Ed Morley 243a6bc4a8 Bug 1414094 - Travis: Fix email notification indentation 2017-11-03 12:01:26 +00:00
Ed Morley 3d94c40c87
Bug 1413509 - Update Node.js from 8.7.0 to 8.9.0 (#2896)
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.9.0
2017-11-01 23:56:44 +00:00
Ed Morley 06265ed4a0
Bug 1413507 - Travis: Update to geckodriver 0.19.1 (#2895)
https://github.com/mozilla/geckodriver/releases/tag/v0.19.1
https://searchfox.org/mozilla-central/source/testing/geckodriver/CHANGES.md
2017-11-01 23:46:03 +00:00
Ed Morley a75cff15aa Bug 1408954 - Use latest yarn on Heroku/Travis (#2839)
For parity with Vagrant and to save the hassle of constantly updating.
Heroku uses the version from `package.json`.
2017-10-17 18:46:50 +02:00
Ed Morley 4269267131 Bug 1408748 - Update node from 8.6.0 to 8.7.0 (#2837)
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.7.0
2017-10-15 16:11:25 +02:00
Cameron Dawson cbf6045a6f Bug 1407008 - Update Node.js from 8.5.0 to 8.6.0 2017-10-09 12:47:43 -07:00
Ed Morley 5d683e048b Bug 1405164 - Update to Python 2.7.14 (#2803)
https://raw.githubusercontent.com/python/cpython/84471935ed2f62b8c5758fd544c7d37076fe0fa5/Misc/NEWS
2017-10-03 18:49:35 +01:00
Ed Morley f38808b924 Bug 1400539 - Travis: Update geckodriver to v0.19.0 (#2776)
https://github.com/mozilla/geckodriver/releases/tag/v0.18.0
https://github.com/mozilla/geckodriver/releases/tag/v0.19.0
2017-09-16 13:32:39 +01:00