From 25dad9f7217a891603aaec3216bc6808c71c0787 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Thu, 25 Mar 2021 18:32:03 +0530 Subject: [PATCH] update documentation --- .github/auto_assign.yml | 4 +- .github/workflows/ci.yml | 3 +- README.md | 2 +- docs/development/DEV_SETUP.md | 93 ++++++++++++++++++++++------------- 4 files changed, 61 insertions(+), 41 deletions(-) diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml index c791bfca..f262b13d 100644 --- a/.github/auto_assign.yml +++ b/.github/auto_assign.yml @@ -6,12 +6,10 @@ addAssignees: author # A list of reviewers to be added to pull requests (GitHub user name) reviewers: - - VishwasShashidhar - - KiranNiranjan - johankwarnmarksymphony - mattias-symphony - - NavyaGopalakrishna - psjostrom + - VinceBT-S # A list of keywords to be skipped the process that add reviewers if pull requests include it skipKeywords: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35505278..f0259b24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,9 @@ -name: Continuous Integration +name: CI on: [push, pull_request] jobs: build: - runs-on: ${{ matrix.os }} strategy: diff --git a/README.md b/README.md index 48bbdb5d..cc17ec02 100644 --- a/README.md +++ b/README.md @@ -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. -Copyright 2019 Symphony LLC +Copyright 2021 Symphony LLC diff --git a/docs/development/DEV_SETUP.md b/docs/development/DEV_SETUP.md index 9c3a1237..3ed6408b 100644 --- a/docs/development/DEV_SETUP.md +++ b/docs/development/DEV_SETUP.md @@ -2,16 +2,14 @@ ### Windows - 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 -- Dot Net 3.5 SP1 -- [Advanced Installer](https://www.advancedinstaller.com/) +- Dot Net 3.5 SP1 or later #### Notes - C++ tools are required to recompile node modules - Dot NET/C# tools required to compile screen-snippet module -- Open 'Developer Command Prompt for VS2015'. This sets paths to visual studio build tools. -- The advanced installer is required to create msi installer +- Open 'Developer Command Prompt for VS2017'. This sets paths to visual studio build tools. ### Mac - Xcode command line tools. Or better, Xcode latest version @@ -20,18 +18,59 @@ #### Notes - 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: -- npm install -- npm run demo (runs platform specific commands) +## Running SDA -*Note*: -- Remember to set this.origin to '*' in `app-bridge.ts` when running the demo. -- Search for `// DEMO-APP:` and comment that line back in. +- Set this.origin to '*' in `app-bridge.ts` when running the demo. +- Search for `// DEMO-APP:` and comment that line back in. - 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 🖥 - npm install @@ -39,7 +78,7 @@ - To build the macOS app: * Run the command `npm run unpacked-mac` * 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` * 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 - To create msi (installer): * Run the advanced installer script located in `installer/win` directory - + #### MSI command line options: - 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="" @@ -97,38 +136,22 @@ - To delete the container/image `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. - The installer will include file config/Symphony.config next to executable. Changes in this file will affect all users. - 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. -## Tests -- Use `npm test` to run all the tests - -### 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 +## Troubleshooting +### Logging - We enable local logging for dev environments using the module [electron-log](https://www.npmjs.com/package /electron-log) - On macOS, we store the logs under `~/Library/Logs/Electron/app_.log` - On Windows, we store the logs under `%USERPROFILE%\AppData\Roaming\Electron\app_.log` - On Linux, we store the logs under `~/.config/Electron/logs/app_.log` -## Misc notes +### Customisation - 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 : --multiInstance --userDataPath=``