Merge branch '16029-cypress-testing'
[arvados-workbench2.git] / README.md
1 [comment]: # (Copyright © The Arvados Authors. All rights reserved.)
2 [comment]: # ()
3 [comment]: # (SPDX-License-Identifier: CC-BY-SA-3.0)
4
5 ## Arvados Workbench 2
6
7 ### Setup
8 <pre>
9 brew install yarn
10 yarn install
11 </pre>
12 Install [redux-devtools-extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
13
14 ### Start project
15 <code>yarn start</code>
16
17 ### Run unit tests
18 <pre>
19 make unit-tests
20 </pre>
21
22 ### Run end-to-end tests
23
24 <pre>
25 make integration-tests
26 </pre>
27
28 ### Run end-to-end tests in a Docker container
29
30 <pre>
31 make integration-tests-in-docker
32 </pre>
33
34 ### Production build
35 <pre>
36 yarn install
37 yarn build
38 </pre>
39
40 ### Package build
41 <pre>
42 make workbench2-build-image
43 docker run -v$PWD:$PWD -w $PWD arvados/fpm make packages
44 </pre>
45
46 ### Build time configuration
47 You can customize project global variables using env variables. Default values are placed in the `.env` file.
48
49 Example:
50 ```
51 REACT_APP_ARVADOS_CONFIG_URL=config.json yarn build
52 ```
53
54 ### Run time configuration
55 The app will fetch runtime configuration when starting. By default it will try to fetch `/config.json`. You can customize this url using build time configuration.
56
57 Currently this configuration schema is supported:
58 ```
59 {
60     "API_HOST": "string",
61     "VOCABULARY_URL": "string",
62     "FILE_VIEWERS_CONFIG_URL": "string",
63 }
64 ```
65
66 #### API_HOST
67
68 The Arvados base URL.
69
70 The `REACT_APP_ARVADOS_API_HOST` environment variable can be used to set the default URL if the run time configuration is unreachable.
71
72 #### VOCABULARY_URL
73 Local path, or any URL that allows cross-origin requests. See
74 [Vocabulary JSON file example](public/vocabulary-example.json).
75
76 To use the URL defined in the Arvados cluster configuration, remove the entire `VOCABULARY_URL` entry from the runtime configuration. Found in `/config.json` by default.
77
78 ### FILE_VIEWERS_CONFIG_URL
79 Local path, or any URL that allows cross-origin requests. See:
80
81 [File viewers config file example](public/file-viewers-example.json)
82
83 [File viewers config scheme](src/models/file-viewers-config.ts)
84
85 To use the URL defined in the Arvados cluster configuration, remove the entire `FILE_VIEWERS_CONFIG_URL` entry from the runtime configuration. Found in `/config.json` by default.
86
87 ### Licensing
88
89 Arvados is Free Software. See COPYING for information about Arvados Free
90 Software licenses.