Commit graph

39 commits

Author SHA1 Message Date
Simon Detheridge
29f09c50c2 Merge pull request #3071 from overleaf/spd-unhandled-promises-in-tests
Treat unhandled promise rejections as errors in tests

GitOrigin-RevId: ba9d8fa02e0687c6b2d1d95e495fe0b54bb0cff5
2020-08-12 02:07:09 +00:00
Henry Oswald
321a4c1f8a Merge pull request #3085 from overleaf/ho-mongo-4.0
bump mongo to 4.0.19 to see if tests pass on ci

GitOrigin-RevId: 70fa2ed6c33c4fa0f996fb975935b71e643fa1c7
2020-08-10 15:55:43 +00:00
Jakob Ackermann
a3a26134fd Merge pull request #3052 from overleaf/ta-lint-no-q
Silence npm run Output

GitOrigin-RevId: 62b8deed0ecc2d2d116a9d4d254f5c306f5c8702
2020-08-10 15:55:09 +00:00
Jakob Ackermann
397bd034c7 Merge pull request #3011 from overleaf/jpa-optionally-increase-mongo-timeout
[misc] optionally increase the mongo timeout

GitOrigin-RevId: f204b017cf3bbb195667739d714b99bfd8a7eaa1
2020-07-16 02:06:56 +00:00
Miguel Serrano
b573374d0e Merge pull request #2950 from overleaf/as-jsdom-tests
JSDOM tests

GitOrigin-RevId: d9e39c61fb2028c5b5577488d74720ef2985eebc
2020-07-11 02:04:35 +00:00
Brian Gough
34a5bb386f Merge pull request #2882 from overleaf/bg-update-node-10.21.0
update node to v10.21.0

GitOrigin-RevId: 6f7774e42e4dbce723f56ca9bc2f287421bf0c39
2020-06-03 10:31:21 +00:00
Timothée Alby
c4ec032ffa Merge pull request #2858 from overleaf/sk-make-lock-timeout-configurable
Make lock timeout configurable

GitOrigin-RevId: c1df72a7cae56db125e090ada75b2c56ca9853bb
2020-06-03 10:30:33 +00:00
Jakob Ackermann
2a8e2efe62 Merge pull request #2845 from overleaf/jpa-faster-web-ci
[misc] faster web ci

GitOrigin-RevId: bbd6b12040956f6b397c6ea4d8144e733299400b
2020-05-23 03:18:08 +00:00
Miguel Serrano
0ba6a1f11d Merge pull request #2805 from overleaf/jpa-bg-bcrypt-rounds-env
[misc] configure the bcrypt rounds via the env variable BCRYPT_ROUNDS

GitOrigin-RevId: 68a2f5b491c7162e943edfbb7e05758114d2b3d8
2020-05-07 03:27:51 +00:00
Shane Kilkelly
7cbb00f207 Merge branch 'sk-token-csrf-protection'
GitOrigin-RevId: e71f7264be45b665502150e9ffbb85b3fc94665e
2020-02-26 04:24:01 +00:00
Jakob Ackermann
6185fe8a30 Merge pull request #2581 from overleaf/jpa-change-base-image
[misc] use node:10.19.0 as base image

GitOrigin-RevId: c66ab9df06533261b12883c328673572f76b1647
2020-02-08 04:14:43 +00:00
Brian Gough
84829abf9a Merge pull request #2578 from overleaf/update-node-10
update to gcr.io/overleaf-ops/node:10.19.0

GitOrigin-RevId: f0eac5e6397842de5f931d145526de3e0a54336b
2020-02-06 04:20:16 +00:00
Christopher Hoskin
6a7c2e85ff Merge pull request #2565 from overleaf/jpa-node-10-18-1
[misc] upgrade node to version 10.18.1

GitOrigin-RevId: 1f27198c6db8253edff1e1425edbfd97c2721a04
2020-02-05 04:25:20 +00:00
Shane Kilkelly
2826832c5e Merge pull request #2502 from overleaf/sk-fix-mongoose-push-all
Tell mongoose to set `usePushEach` on all models

GitOrigin-RevId: faea6653f272f74ea7274596bdc934ef93638d76
2020-01-09 04:14:22 +00:00
Eric Mc Sween
082f790fb6 Merge pull request #2180 from overleaf/as-clean-up-makefile
Clean up how tests are run in Makefile

GitOrigin-RevId: 9b52ead16392cca09bdf7edc4365f10dc468ccf2
2019-10-23 12:58:39 +00:00
Alasdair Smith
9cf73f965c Merge pull request #1440 from overleaf/as-amd-webpack
Bundle all frontend code with webpack

GitOrigin-RevId: 1bd93dad516c456fe1649193868e841e20459b0b
2019-10-16 10:36:21 +00:00
Christopher Hoskin
8aa8840db0 Merge pull request #1745 from overleaf/csh-issue-1118-node-10.15.3
Csh issue 1118 node 10.15.3

GitOrigin-RevId: 5b75d030d9d07bdb41dbca46f90fd950293e17b3
2019-05-07 10:58:52 +00:00
Ersun Warncke
2421593d85 run unit and acceptance tests in parallel (#1545)
GitOrigin-RevId: fefdfa04d9b9496bf6c98b37331fc4a084de065a
2019-03-11 11:00:58 +00:00
Henry Oswald
d55b38cc05 Merge pull request #1471 from sharelatex/ho-docker2
Move to docker image based builds

GitOrigin-RevId: 992aeaf69bfea4d1847a07c457575a63985d4407
2019-03-11 10:59:20 +00:00
Christopher Hoskin
95c8e29e66 Merge pull request #1322 from sharelatex/csh-issue-1309-node-6.15.1
Bump node to 6.15.1

GitOrigin-RevId: 7ae516d1231cd79baf0ff29768768a53b1f5f080
2019-01-02 16:03:52 +00:00
James Allen
65c1943c63 Merge pull request #1249 from sharelatex/ja-single-process-acceptance-tests-2
Move to running acceptance tests in same process as web server

GitOrigin-RevId: 65757f0b57ac621cafb0066b5c5a7abb30333edd
2018-12-13 09:25:50 +00:00
Douglas Lovell
aae0484458 Merge branch 'master' into dcl-i1207
GitOrigin-RevId: c947041ca99860d4afb62ecfd28ba6fe1c717bfc
2018-11-30 13:24:27 +00:00
Douglas Lovell
ed3147a58f Allow open from template button when lacking source
GitOrigin-RevId: 8fd49bff6cc0f66d041bb70f9345b2744978be3a
2018-11-30 13:24:23 +00:00
James Allen
1070cd36bb Merge pull request #1163 from sharelatex/ja-zotero
Add support for Zotero linked files

GitOrigin-RevId: 917a881254949163126746667d6debc2a3f16941
2018-11-28 11:35:27 +00:00
James Allen
ba17c1da14 Cache pug templates and modules, by using production environment 2018-07-10 16:15:50 +01:00
Shane Kilkelly
b32c9be8ca Linked files from Mendeley. 2018-07-04 10:05:03 +01:00
Shane Kilkelly
28257462ae Acceptance tests for project-output-file 2018-06-22 13:09:18 +01:00
Shane Kilkelly
691eec48ba Merge branch 'master' into sk-linked-files-from-project 2018-05-22 15:39:09 +01:00
Shane Kilkelly
e34131ed45 Add acceptance test for project linked files 2018-05-22 15:01:51 +01:00
James Allen
b1f378208d Properly merge subscriptions from different places 2018-05-22 10:05:08 +01:00
Alasdair Smith
8bde5120dd Change frontend test commands so its easier to run locally in debug mode 2018-03-07 09:52:08 +00:00
James Allen
d4025908b7 Add in enabledLinkedFileTypes setting 2018-03-05 10:37:53 +00:00
James Allen
a99f55891f Use external proxy 2018-03-05 10:37:53 +00:00
Alasdair Smith
ff7e016227 Add frontend test docker config
Adds Dockerfile to make headless Chrome image
2018-02-20 14:01:02 +00:00
James Allen
662122bb1c CI and local dev environment improvements
The need for this became very noticeable due to the slowness of filesystem access in docker-in-mac, with a full compile taking over a minute for me in docker. Using make to introduce incremental compile makes this near instantaneous outside of docker (if only a few files have changed), and quick enough inside docker.

With incremental compile via make, it compiles quickly enough that re-compiling and restarting the web service automatically when backend files change is quick enough now. This is how the service is run via docker-compose in https://github.com/sharelatex/sharelatex-dev-environment, so it shouldn't be necessary to manually restart the container each time a coffee file changes.

At the moment Jenkins pull web modules in via the GitSCM plugin, but I believe this is creating a dependency in Jenkins, where any commits to any of the modules causes all of the web branches to rebuild. By doing it via our own scripts we can hopefully avoid this. It also creates a build process which is reproducible locally.

**Note that at the moment in this PR all modules pull from `ja-dockerize-dev` branches, but these should be merged first, and this PR updated to point to the master branches before merging**. This is necessary for other changes to build process/docker-compose workflow.

As well as a Makefile for web, there is now a `Makefile.module`. This is copied into each module directory by the top-level Makefile, and is written in a way to be flexible and support unit tests, acceptance tests, front-end js for the ide and main, and the modules `app/coffee` directory, while allowing modules to have some of these missing (not all modules have e.g. acceptance tests, or front-end JS). This will allows us to refine the build process in future, without needing to update the Makefile in each module repo separately (I found this to be a painful part of this development).

This makes web compatible with the docker-compose workflow at https://github.com/sharelatex/sharelatex-dev-environment, where each service is running in its own docker container, with networking managed by docker.

Previously the Makefile was set up to run unit tests in docker with `make unit_tests`. This now just runs them natively. In the CI, they are run in docker anyway (all steps in Jenkins are), and locally, they run fine natively with `npm run test:unit`, or can be run in docker via https://github.com/sharelatex/sharelatex-dev-environment with `bin/run web_sl npm run test:unit`.

Previously we did a lot of juggling with only mounting source files (coffee, less, etc) into the docker container for acceptance tests. This was to avoid creating root owned files if the whole directory was mounted. Now instead the whole web directory is mounted read-only, with the compilation step done outside of the container before running the tests.

This allows the host and container to share the `node_modules` folder as well, which avoids needing to `npm install` twice on the CI box, and should speed up the build by a few minutes.

On macOS, this would cause a problem with compiled modules if you tried to use the same `node_modules` to run the app natively. However, if running via docker-compose in https://github.com/sharelatex/sharelatex-dev-environment, this is no longer a problem.
2018-01-15 09:36:41 +00:00
Hayden Faulds
1405b645f3 fix acceptance tests after rebase 2017-12-04 09:42:10 +00:00
James Allen
50b3045548 Tidy up docker-compose and makefile 2017-11-29 13:49:36 +00:00
James Allen
49057a5ab7 Only mount coffee and needed files into Docker so js isn't written back to local system 2017-11-27 17:10:58 +00:00
James Allen
fbf8cc2d03 Run acceptance tests via docker compose 2017-11-27 17:10:58 +00:00