Commit graph

93 commits

Author SHA1 Message Date
Brian Gough
0879226f74 Merge pull request #1330 from sharelatex/as-fix-prettier-ignore
Fix linting ignoring index.js files in modules

GitOrigin-RevId: 8ac9fa8f8655553680678b206848d1a66718d821
2019-01-15 10:55:36 +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
Jessica Lawshe
e8b7ab1f8a Merge pull request #1195 from sharelatex/jel-portal-ieee
Add IEEE portal

GitOrigin-RevId: 7f3ba43be0874791cfd32bb8bf3004aac61b22d3
2018-11-29 15:27:09 +00:00
Paulo Jorge Reis
02eb683298 Merge pull request #1113 from sharelatex/pr-compile-only-ol-dark-dev
Move LESS compilation process to Makefile

GitOrigin-RevId: 5a3871759eda2685ec0690899b0904d45c7db0a6
2018-11-16 12:02:47 +00:00
Alasdair Smith
659242b457 Merge pull request #1037 from sharelatex/as-decaffeinate
Decaffeinate frontend

GitOrigin-RevId: 1c8c53dedecfe55f9936a13408df17b852f996de
2018-11-05 10:19:25 +00:00
Paulo Reis
2ef1b4904d Bootstrap the light theme. 2018-07-09 15:45:09 +01:00
James Allen
99728d8f18 Bail out with exit code on acceptance test failure 2018-06-19 13:56:34 +01:00
James Allen
c60b74a2b1 Merge pull request #652 from sharelatex/ja-fix-front-end-test
Fix frontend HistoryV2ManagerTests
2018-06-14 09:11:32 +01:00
James Allen
76d10e6402 Improve error message readability 2018-06-13 10:40:36 +01:00
James Allen
f57290382d Explain error if web crashes in acceptance tests 2018-06-13 10:11:38 +01:00
James Allen
d4efdb3ede Fix frontend HistoryV2ManagerTests 2018-06-11 15:47:23 +01:00
Hayden Faulds
be0fd9a446 reduce container teardown timeout to 0 2018-06-05 11:30:48 +01:00
Tim Alby
a9f1989eca add test_unit_app task 2018-05-23 15:47:28 +02:00
James Allen
b1f378208d Properly merge subscriptions from different places 2018-05-22 10:05:08 +01:00
James Allen
1e8439a2c6 Fix restore of docs from old deleted docs 2018-04-06 10:30:13 +01:00
Alasdair Smith
4d79c68f41 Rename webpack prod compile to minify_es and run as part of minify step
Fixes issue where webpack prod files were wiped after running minify on CI
2018-03-15 11:29:36 +00:00
Alasdair Smith
8537c7b9b6 Add production webpack npm script 2018-03-15 09:42:26 +00:00
Alasdair Smith
864bf771a4 Merge pull request #362 from sharelatex/as-linting
Linting new ES code
2018-02-27 11:06:11 +00:00
Brian Gough
bc37003769 use COFFEE_OPTIONS by default 2018-02-26 09:50:23 +00:00
Brian Gough
42b701fd34 use the make automatic variable @D for the target directory name 2018-02-23 11:43:10 +00:00
Alasdair Smith
325f91ed2e Add scripts for running linting 2018-02-23 11:41:21 +00:00
Brian Gough
d364bfc353 add support for debugging 2018-02-23 11:36:08 +00:00
Alasdair Smith
f529137db0 Clean frontend tests 2018-02-20 14:01:50 +00:00
Alasdair Smith
24ec7b77ab Convert frontend test runs to use Docker/karma 2018-02-20 14:01:50 +00:00
Alasdair Smith
09fbafa1f6 Include ShareJS CM adapter in compiled lib and fix bug with CM adapter
Because the CM & Ace scripts are naively concat-ed together, the Ace
applyToShareJS function would be overwritten by the CM version.

Also fixes bugs where adapter was calling old version of ShareJS api
and the old CM api
2018-02-09 10:38:51 +00:00
James Allen
3ac4e4c457 Run docker-compose down before acceptance tests 2018-01-19 12:42:49 +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
James Allen
dfe6e26946 test_unit_frontend -> test_frontend in Makefile 2017-12-19 13:58:47 +00:00
James Allen
b0812864ac Clean up CI output 2017-12-19 13:58:47 +00:00
James Allen
d7a26e27e5 Run front end tests in CI 2017-12-19 13:58:47 +00:00
James Allen
a9ca54b98a Generate docker-compose.yml before any docker-compose command 2017-12-02 13:02:37 +00:00
James Allen
e9733514af Fail on failing module acceptance tests 2017-12-01 10:07:09 +00:00
James Allen
fa2a3574db Look for Makefile, not makefile 2017-12-01 09:01:36 +00:00
James Allen
040546b1d3 Move -q flag to correct place 2017-12-01 08:49:10 +00:00
James Allen
b2a3e06717 Find / replace mistake 2017-11-30 11:20:25 +00:00
James Allen
870e87ebe1 Run npm with -q flag for less verbose test output 2017-11-30 11:00:28 +00:00
James Allen
bb74f8318a Support make clean install usage 2017-11-29 14:16:29 +00:00
James Allen
50b3045548 Tidy up docker-compose and makefile 2017-11-29 13:49:36 +00:00
James Allen
054964dd85 Clean out module js on make clean 2017-11-27 17:10:58 +00:00
James Allen
5e0fc24c1a Allow modules to specific their own acceptance tests 2017-11-27 17:10:58 +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
Renamed from services/web/makefile (Browse further)