Commit graph

182 commits

Author SHA1 Message Date
Travis Ralston
776b3af6bb Fix relative pathing on riot-web link 2020-01-20 16:33:22 -07:00
Travis Ralston
19615d3721 Disable minification of Riot in end-to-end tests 2020-01-20 16:33:13 -07:00
Travis Ralston
27412ba0b2 Fix end-to-end test layering too 2020-01-20 16:23:33 -07:00
Travis Ralston
3eeeb9c6af Remove irrelevant build steps 2020-01-20 16:20:02 -07:00
Travis Ralston
62b1dd77a6 Fix layering of the riot-web tests pipeline 2020-01-20 16:12:59 -07:00
Travis Ralston
8f37f8638d Build the js-sdk for Jest tests
This is theoretically a fix for the tests failing post-sourcemaps.
2020-01-15 10:28:27 -07:00
Travis Ralston
a8c8406ac4 Merge remote-tracking branch 'origin/t3chguy/jest' into travis/sourcemaps 2020-01-09 16:06:46 -07:00
Travis Ralston
fde32f13a5 [CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop 2020-01-09 14:15:09 -07:00
David Baker
2970a9faaf Don't fail if logs exists and is an empty dir 2020-01-03 15:16:02 +00:00
Michael Telatynski
d35b01b63a Get rid of stripped-emoji.json in favour of an in-memory single truth source 2019-12-18 15:40:19 +00:00
Michael Telatynski
386d6ec055 we don't need to install riot-web for react-sdk unit tests 2019-12-17 12:16:40 +00:00
Travis Ralston
20a615396b Implementation of new potential skinning mechanism
With a switch to Only One Webpack™ we need a way to help developers generate the component index without a concurrent watch task. The best way to do this is to have developers import their components, but how do they do that when we support skins? The answer in this commit is to change skinning.

Skinning now expects to receive your list of overrides instead of the react-sdk+branded components. For Riot this means we send over *only* the Vector components and not Vector+react-sdk. 

Components can then be annotated with the `replaceComponent` decorator to have them be skinnable. The decorator must take a string with the dot path of the component because we can't reliably calculate it ourselves, sadly. 

The decorator does a call to `getComponent` which is where the important part of the branded components not including the react-sdk is important: if the branded app includes the react-sdk then the decorator gets executed before the skin has finished loading, leading to all kinds of fun errors. This is also why the skinner lazily loads the react-sdk components to avoid importing them too early, breaking the app.

The decorator will end up receiving null for a component because of the getComponent loop mentioned: the require() call is still in progress when the decorator is called, therefore we can't error out. All usages of getComponent() within the app are safe to not need such an error (the return won't be null, and developers shouldn't use getComponent() after this commit anyways).

The AuthPage, being a prominent component, has been converted to demonstrate this working. Changes to riot-web are required to have this work.

The reskindex script has also been altered to reflect these skinning changes - it no longer should set the react-sdk as a parent. The eventual end goal is to get rid of `getComponent()` entirely as it'll be easily replaced by imports.
2019-12-12 19:48:45 -07:00
David Baker
604745de96
Merge pull request #3698 from matrix-org/dbkr/chmod_ci
Make CI scripts executable
2019-12-05 11:39:58 +00:00
David Baker
c44cfff7cf Remove logs before running end-to-end tests
Hopefully will stop the end-to-end tests failing when buildkite
re-uses an agent.
2019-12-04 11:17:41 +00:00
David Baker
c36950db23 Make CI scripts executable
and remove chmod line from pipeline
2019-12-04 10:30:37 +00:00
Bruno Windels
b03ebb964b split up installing static webserver and riot copy
so we can just do the latter for the e2e tests on CI
2019-10-18 17:18:18 +02:00
Bruno Windels
645a9d836f install static webserver for server symlinked riot on CI 2019-10-10 11:40:04 +02:00
Bruno Windels
5b9bfae320 first attempt at running local e2e tests from CI 2019-10-09 17:03:01 +02:00
Travis Ralston
f6af464fff Verify i18n in CI
To protect developers from mistakes such as missing strings or getting them out of order.
2019-07-11 12:37:17 -06:00
Matthew Hodgson
dbc6815abf make EmojiProvider and stripped-emoji.json work 2019-05-19 20:48:18 +01:00
Matthew Hodgson
dc72641264 replace emojione with twemoji. completely untested & debugged & unoptimised 2019-05-19 15:23:43 +01:00
Bruno Windels
f5f89ee4e3 move package installation to docker image to avoid on every run 2019-04-09 17:56:03 +02:00
Bruno Windels
57092eeb4f add buildkite sections 2019-04-09 17:27:49 +02:00
Bruno Windels
7dde322ce2 only need to invoke artifact tool once 2019-04-09 17:19:29 +02:00
Bruno Windels
64f123563b upload separate log files 2019-04-09 17:16:39 +02:00
Bruno Windels
6a4a443c26 attempt at uploading logs as artefacts 2019-04-09 16:20:33 +02:00
Bruno Windels
5802a1d9eb also show test logs 2019-04-09 15:11:33 +02:00
Bruno Windels
309d2ead8f dump server log after running tests 2019-04-09 14:39:31 +02:00
Bruno Windels
addafe224f need to disable sandbox because ci tests run as root and puppeteer wont let you do stupid stuff by accident 2019-04-05 17:39:41 +02:00
Bruno Windels
4eeaf05e81 no sandbox didn't work, lets try installing a gazilion deps from the puppeteer page 2019-04-05 17:29:33 +02:00
Bruno Windels
af0dee0d65 disable sandbox to run under debian 2019-04-05 16:45:41 +02:00
Bruno Windels
711974a6df remove obsolete --travis flag 2019-04-03 17:05:19 +02:00
J. Ryan Stinnett
6f79e8503a Switch to git protocol for CI dependencies
If you try to clone a repo that doesn't exist via `https`, `git` will prompt for
auth credentials and hang forever. Using `git` avoids this and fails immediately
instead, which is what we want for a missing repo.

Part of https://github.com/vector-im/riot-web/issues/9221
2019-03-20 18:06:07 +00:00
J. Ryan Stinnett
02569fca4b Support CI for matching branches on forks
Currently, people with push access to the main Riot repos can push matching
branch names to Riot and the SDKs, and CI will test all the branches together.
This change allows contributors to access the same ability when submitting
several matching PRs from their fork of each repo.

Part of https://github.com/vector-im/riot-web/issues/9041
2019-03-19 16:59:31 +00:00
Travis Ralston
6d7703dcb6 Re-introduce yarn test and fix comments 2019-03-15 11:19:05 -06:00
Travis Ralston
365c8e9fdc Fetch downstream dependencies from as many places as possible
Gives the build the best possible chance at passing
2019-03-15 10:34:30 -06:00
Travis Ralston
5b68a70da1 Remove uneeded CHROME_BIN env setter 2019-03-15 10:33:55 -06:00
Travis Ralston
cab5f7aba4 Use the right branch for fetching dependencies 2019-03-13 22:44:09 -06:00
Travis Ralston
618b2b1ae6 Add basic BuildKite :pipeline: 2019-03-13 17:42:05 -06:00
J. Ryan Stinnett
d9063bbf8e Maybe bash instead of dash 2019-03-11 18:36:45 +00:00
J. Ryan Stinnett
337ac2f6a0 Reorder link and install steps
Take advantage of Yarn's preservation of links while installing and set up links
first and install second. This should result in a small speedup since we no
longer install the published SDKs just to replace them on the next line.
2019-03-11 18:36:45 +00:00
J. Ryan Stinnett
7c947d87ab Update scripts and docs to use yarn where appropriate
Most `npm` operations are replaced with `yarn`, which generally has better
behavior. However, steps like publish that write to the NPM registry are left to
`npm`, which currently handles these tasks best.
2019-03-11 14:22:02 +00:00
David Baker
1e7af106b0 Merge branch 'master' into develop 2019-03-06 11:28:54 +00:00
David Baker
63c6f600bf Use webpack alias to resolve the languages file
Hopefully this will end up simpler than having to figure out in
riot-web what the relative path is from react-sdk's
src/languageHandler.js to riot-web's webapp directory.
2019-03-01 11:30:50 +00:00
Bruno Windels
712522a16d set chrome path for travis CI explicitly
karma seems to be giving priority to a location where an old version is installed.
2019-02-28 12:45:43 +01:00
Bruno Windels
6bf8269bcd riot-web is a subdirectory when running the tests 2019-02-18 17:26:09 +01:00
Bruno Windels
19190deb3c set x perms 2019-01-09 15:20:55 +01:00
Bruno Windels
45558f5323 run both react-sdk and riot-web tests 2019-01-09 15:16:20 +01:00
Bruno Windels
509ae4cea4 run unit tests on riot-web like before 2019-01-09 15:02:20 +01:00
Bruno Windels
419726f423 set executable perms 2019-01-09 14:43:05 +01:00
Bruno Windels
481cd292ad make e2e tests job conditional at travis.yml level 2019-01-09 14:36:32 +01:00
Bruno Windels
5ce08523f8 split up script for unit and end-to-end tests so unit tests are not run as part of e2e tests 2019-01-09 14:21:45 +01:00
Erik Johnston
ab468b5346 Refactor travis-ci to use parallel jobs 2019-01-08 11:33:12 +00:00
Travis Ralston
8017f0a4a1 Merge remote-tracking branch 'origin/experimental' into travis/develop-for-real 2019-01-03 16:00:23 -07:00
David Baker
f928be6f59 Revert "Merge pull request #2395 from matrix-org/dbkr/merge_develop_experimental"
This reverts commit ad47144355.
2019-01-03 15:37:03 -07:00
David Baker
7d161de35b Partial merge of develop to experimental
Does not include #2336 as the file has been moved out from underneath it:
will do this separately
2019-01-03 15:02:58 +00:00
J. Ryan Stinnett
135a0884c9
Update scripts/fetchdep.sh
Co-Authored-By: turt2live <travpc@gmail.com>
2018-12-28 19:42:13 -07:00
Travis Ralston
310f634a0d Ensure we install the master branch of the e2e tests as a default 2018-12-21 19:24:07 -07:00
J. Ryan Stinnett
7affd5fcff Try fetching more branches for PRs
Attempt both the PR author's branch and the PR's target branch. This resolves
issues on experimental where we need riot-web to also be experimental.
2018-12-20 22:58:09 +00:00
Travis Ralston
a2b825ba92 Sort translations by file name
This keeps the strings close together and roughly in the same area as the others, and makes it easier to maintain the translation file.
2018-12-05 11:52:10 -07:00
Travis Ralston
fb262596b2 Provide more helpful errors when i18n generation fails
Also fix TextForEvent.js so it doesn't break the script. Using a variable here is not recognized, so the object has been moved inline instead.
2018-09-27 11:55:57 -06:00
David Baker
e1394d592a
Allow translation tags object to be a variable
Don't try to validate the translation tags if it's not an object literal.
2018-09-14 14:11:59 +01:00
Michael Telatynski
07f0713a56
allow autocompleting Emoji by common aliases, e.g 👍 to 👍
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-24 17:06:45 +01:00
Michael Telatynski
7225f7372c
Revert " make click to insert nick work on join/parts, /me's etc" 2018-07-03 10:30:08 +01:00
Michael Telatynski
dddf7991b9
create map-i18n to aid with transforming the i18n entries not to waste them
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-29 14:56:06 +01:00
David Baker
9f8202c8a9 Remove directories if they exist 2018-05-02 16:49:08 +01:00
David Baker
82349ec933 Fix sed 2018-05-02 16:43:51 +01:00
David Baker
183947615f Fux up jenkins origin/ branches 2018-05-02 16:39:10 +01:00
David Baker
0040ea0d9f Use develop js-sdk in travis build 2018-05-02 15:53:38 +01:00
David Baker
9bccecf449 Get symlink right
Also No need to cd into the symlink, can just go straight there
2018-05-02 11:23:57 +01:00
David Baker
825d610938 Bah, no pushd.
Also this npm install should now be unnecessary
2018-05-02 11:13:16 +01:00
David Baker
c54198464b npm install the js-sdk 2018-05-02 11:09:28 +01:00
David Baker
b44582777b Would if I added the script 2018-05-02 11:03:40 +01:00
David Baker
730512bc3f Use the right js-sdk branch when testing
On the react-sdk tests not just riot-web
2018-05-02 10:58:43 +01:00
Matthew Hodgson
40a67ca8fe point imports at the new locations 2018-04-13 00:43:44 +01:00
Stefan Parviainen
9cf7e1b480 Validate tag replacements in gen-i18n 2017-11-13 20:20:14 +01:00
David Baker
8447d15013 Don't include the |other in the translation value 2017-10-24 14:26:30 +01:00
David Baker
93fca8439e Merge pull request #1521 from matrix-org/dbkr/geni18n-addplural
Fix bug with gen-i18n/js when adding new plurals
2017-10-24 11:15:51 +01:00
David Baker
46e9d4197a Use the 'and' feature! 2017-10-24 10:21:41 +01:00
David Baker
2340c1308e Fix bug with gen-i18n/js when adding new plurals 2017-10-23 19:53:17 +01:00
David Baker
54458f1438 Actually even out brackets 2017-10-23 14:02:58 +01:00
David Baker
8d1aea5b2e Misc PR review fixes 2017-10-23 10:18:29 +01:00
David Baker
317ad64ae6 Make the gen-i18n script validate _t calls
And throw a massive tantrum if you've messed up your format strings.

Because broken format strings making their way into the app cause it
to throw exceptions.
2017-10-20 18:38:22 +01:00
David Baker
d397858e81 Don't remove other plural variants 2017-10-19 14:39:23 +01:00
David Baker
8a9de7343c Add script to prune unused translations 2017-10-19 12:11:21 +01:00
David Baker
027a70ffe7 Add gen-i18n as a 'binary'
and add appropriate shebang
2017-10-19 10:51:54 +01:00
David Baker
1bada070ca Make gen-i18n support 'HTML'
Where by 'HTML' I mean just run the same regex as riot does over
some text.

Also make it walk multiple paths.

This mostly means it can be used for riot-web.
2017-10-18 19:36:07 +01:00
David Baker
2bbac903f1 'base file' is a bit overloaded by weblate 2017-10-18 14:45:04 +01:00
David Baker
caa4979e37 Comment ignoring getTKey returning null 2017-10-18 14:43:18 +01:00
David Baker
63a7d37f5a commented logging 2017-10-18 14:41:54 +01:00
David Baker
a2bfdd8925 missing saemi 2017-10-18 14:33:21 +01:00
David Baker
f759467193 Get English plural strings from an input file 2017-10-18 14:30:55 +01:00
David Baker
11761f535d Copyright 2017-10-18 13:39:04 +01:00
David Baker
8370c823b6 Script to generate the translations base file
Also replaces the translations base file with the output of the
script.
2017-10-17 19:19:01 +01:00
Luke Barnard
07b6040c39 Update travis script to use lintwithexclusions 2017-09-28 11:33:36 +01:00
Luke Barnard
2de4dd7b71 Filter out unsupported emoji from the emoji meta data
Because apparently emojione provides meta data for more than the emojis it supports itself.

Fixes https://github.com/vector-im/riot-web/issues/4504
2017-07-05 17:09:16 +01:00
Luke Barnard
982b009b90 Implement ascii emoji tab completion
When a fully plaintext, ascii emoji is typed like ";-)", pressing tab will suggest emojione to replace it with based off of the meta data provided by emojione.

e.g. the aliases_ascii for `😃` are [":D",":-D","=D"] so typing ":D *tab*" will insert a real 😃
2017-06-29 11:29:55 +01:00
Luke Barnard
48eb6f251b Update comment 2017-06-28 13:44:44 +01:00
Luke Barnard
30f80b57f2 Instead of making this part of the build process, let the devs generate stripped-emoji.json
With the expectation that when the file needs to be regenerated to include other keys, the developer will run this script.
2017-06-28 13:28:48 +01:00
Luke Barnard
2b8da85726 Strip the emoji meta-data for the data we need
This is done at build time by parsing emojione/emoji.json, stripping it and then writing to ./lib/stripped-emoji.json.
2017-06-28 11:36:19 +01:00