update documentation

This commit is contained in:
Vishwas Shashidhar 2021-03-25 18:32:03 +05:30
parent d63dba8b10
commit 25dad9f721
4 changed files with 61 additions and 41 deletions

View File

@ -6,12 +6,10 @@ addAssignees: author
# A list of reviewers to be added to pull requests (GitHub user name) # A list of reviewers to be added to pull requests (GitHub user name)
reviewers: reviewers:
- VishwasShashidhar
- KiranNiranjan
- johankwarnmarksymphony - johankwarnmarksymphony
- mattias-symphony - mattias-symphony
- NavyaGopalakrishna
- psjostrom - psjostrom
- VinceBT-S
# A list of keywords to be skipped the process that add reviewers if pull requests include it # A list of keywords to be skipped the process that add reviewers if pull requests include it
skipKeywords: skipKeywords:

View File

@ -1,10 +1,9 @@
name: Continuous Integration name: CI
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -42,4 +42,4 @@ Read [Dev Setup](docs/development/DEV_SETUP.md)
The code in this repository is distributed under the Apache License, Version 2.0. The code in this repository is distributed under the Apache License, Version 2.0.
Copyright 2019 Symphony LLC Copyright 2021 Symphony LLC

View File

@ -2,16 +2,14 @@
### Windows ### Windows
- NodeJS version >= 12.x.y (corresponds to electron 9.x.y) - NodeJS version >= 12.x.y (corresponds to electron 9.x.y)
- Microsoft Visual Studio 2015 Community or Paid (C++ and .NET/C# development tools) - Microsoft Visual Studio 2017 Community or Paid (C++ and .NET/C# development tools)
- Python >= 2.7.1 - Python >= 2.7.1
- Dot Net 3.5 SP1 - Dot Net 3.5 SP1 or later
- [Advanced Installer](https://www.advancedinstaller.com/)
#### Notes #### Notes
- C++ tools are required to recompile node modules - C++ tools are required to recompile node modules
- Dot NET/C# tools required to compile screen-snippet module - Dot NET/C# tools required to compile screen-snippet module
- Open 'Developer Command Prompt for VS2015'. This sets paths to visual studio build tools. - Open 'Developer Command Prompt for VS2017'. This sets paths to visual studio build tools.
- The advanced installer is required to create msi installer
### Mac ### Mac
- Xcode command line tools. Or better, Xcode latest version - Xcode command line tools. Or better, Xcode latest version
@ -20,18 +18,59 @@
#### Notes #### Notes
- Ensure you have accepted the XCode license agreement - Ensure you have accepted the XCode license agreement
- We use Sudre packages to create a .pkg installer file - We use Sudre packages to create a .pkg installer file
## Run demo: ## Running SDA
- npm install
- npm run demo (runs platform specific commands)
*Note*: - Set this.origin to '*' in `app-bridge.ts` when running the demo.
- Remember to set this.origin to '*' in `app-bridge.ts` when running the demo. - Search for `// DEMO-APP:` and comment that line back in.
- Search for `// DEMO-APP:` and comment that line back in.
- Make sure to comment it out again before you commit. - Make sure to comment it out again before you commit.
## Build Instructions:
```
# Install dependencies
npm install
# Build SDA
npm run prebuild
# Run against a POD
cross-env ELECTRON_DEV=true electron . --url=https://corporate.symphony.com
# Run the demo app
npm run demo
```
## Tests
```
# Run all the tests
npm run compile:spec
npm run test
# Specific Tests
npm run test -- --match=spell*
# Run Unit tests only
npm run test:unit
# Specific Unit tests
npm run test:unit -- --match=spell*
# Spectron tests only
npm run compile:spec
npm run test:spectron
# Specific Spectron tests
npm run test:spectron -- --match=spell*
```
### Code Coverage
- We capture the Code coverage reports under [coverage](out/coverage)
- To check the test run report, see the [out](out/) directory
- See the [tests](spec/) directory to find all the unit tests
## Packaging:
### Mac 🖥 ### Mac 🖥
- npm install - npm install
@ -39,7 +78,7 @@
- To build the macOS app: - To build the macOS app:
* Run the command `npm run unpacked-mac` * Run the command `npm run unpacked-mac`
* The distributable is created in the `dist/mac` directory * The distributable is created in the `dist/mac` directory
- To build mac package (installer): - To build mac package (installer):
* Run the command `npm run packed-mac` * Run the command `npm run packed-mac`
* The .pkg file will be generated in the `installer/mac/build` directory * The .pkg file will be generated in the `installer/mac/build` directory
@ -54,7 +93,7 @@
* The distributable is created in the `dist/win-unpacked` directory * The distributable is created in the `dist/win-unpacked` directory
- To create msi (installer): - To create msi (installer):
* Run the advanced installer script located in `installer/win` directory * Run the advanced installer script located in `installer/win` directory
#### MSI command line options: #### MSI command line options:
- To install for all users (admin required): msiexec.exe /i Symphony-x64.msi ALLUSERS=1 - To install for all users (admin required): msiexec.exe /i Symphony-x64.msi ALLUSERS=1
- To install per user: msiexec.exe /i Symphony-x64.msi ALLUSERS="" - To install per user: msiexec.exe /i Symphony-x64.msi ALLUSERS=""
@ -97,38 +136,22 @@
- To delete the container/image - To delete the container/image
`docker rmi -f linux:6.0.0` `docker rmi -f linux:6.0.0`
## Change POD URL ### Change POD URL
- To change the start url (i.e., pod url), edit config/Symphony.config and change 'url' variable. if no protocol provided, then https will be added. - To change the start url (i.e., pod url), edit config/Symphony.config and change 'url' variable. if no protocol provided, then https will be added.
- The installer will include file config/Symphony.config next to executable. Changes in this file will affect all - The installer will include file config/Symphony.config next to executable. Changes in this file will affect all
users. users.
- Alternatively, to run against a specific pod, launch Symphony (SDA) with the command line parameter `--url=pod_url - Alternatively, to run against a specific pod, launch Symphony (SDA) with the command line parameter `--url=pod_url
`. With this, you don't have to change the config/Symphony.config file every time. `. With this, you don't have to change the config/Symphony.config file every time.
## Tests ## Troubleshooting
- Use `npm test` to run all the tests ### Logging
### Unit tests and Code Coverage
- [Jest framework](http://facebook.github.io/jest/) is used to run tests
- Use `npm run test:unit` to run unit tests
- We capture the Code coverage reports under [coverage](out/coverage)
- To check the test run report, see the [out](out/) directory
- See the [tests](spec/) directory to find all the unit tests
### Spectron Tests (UI)
- [AVA](https://github.com/avajs/ava) is used to run Spectron tests
- Use `npm run test:spectron` to run spectron tests
- To compile spectron tests `npm run compile:spec`
- To run specific test use example: `npm run test:spectron -- --match=spell*` runs only spellchecker related tests
- Spectron - Application logs can be found in `~/Library/Logs/Electron/`
## Logging
- We enable local logging for dev environments using the module [electron-log](https://www.npmjs.com/package - We enable local logging for dev environments using the module [electron-log](https://www.npmjs.com/package
/electron-log) /electron-log)
- On macOS, we store the logs under `~/Library/Logs/Electron/app_<timestamp>.log` - On macOS, we store the logs under `~/Library/Logs/Electron/app_<timestamp>.log`
- On Windows, we store the logs under `%USERPROFILE%\AppData\Roaming\Electron\app_<timestamp>.log` - On Windows, we store the logs under `%USERPROFILE%\AppData\Roaming\Electron\app_<timestamp>.log`
- On Linux, we store the logs under `~/.config/Electron/logs/app_<timestamp>.log` - On Linux, we store the logs under `~/.config/Electron/logs/app_<timestamp>.log`
## Misc notes ### Customisation
- If you need to run against a POD without proper cert use cmd line option: --ignore-certificate-errors - If you need to run against a POD without proper cert use cmd line option: --ignore-certificate-errors
- To start an additional instance with custom data directory (if you want seperate user) use cmd line options - To start an additional instance with custom data directory (if you want seperate user) use cmd line options
: --multiInstance --userDataPath=`<path to data dir>` : --multiInstance --userDataPath=`<path to data dir>`