1.0.0 • Published 7 months ago

radigio-proposal v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

radigio-proposal

This is the repository for proposal management.

Master workflow

Table of contents

Prerequisite

  • Install Node.js (10.15.0)
  • Install Postgres (10.7)
  • Install yarn (npm i yarn -g)
  • Install typescript (npm i typescript -g)

Setup Instructions

  • Clone mentioned projects in your workspace radigio-proposal (git clone https://github.com/Marketron/radigio-proposal) radigio-common-utilities (git clone https://github.com/Marketron/radigio-common-utilities)
  • cd radigio-common-utilities
  • git checkout develop
  • cd radigio-proposal
  • git checkout develop
  • Run yarn - to install the packages
  • Change environment variables. Please take a look at Environment Variables
  • Run yarn start

Environment Variables

  • cd radigio-proposal
  • Copy env file cp .env-example .env
  • Modify SQL_USERNAME, SQL_PASSWORD, SQL_HOST and SQL_PORT as per your localhost/remote server.
  • Make sure METADATA_BASE_URI and ORDER_BASE_URI is pointing to correct services (local or dev servers) example: http://localhost:3006/metadata/api, http://localhost:3005/order/api
  • AWS_S3_KEY and AWS_S3_SECRET should be added
  • Give sonar details if you like to run sonar locally
  • Create proposal db as per env file. (example: if SQL_DATABASE=radigio_proposal then create radigio_proposal_dev DB for dev env and radigio_proposal_test DB for test env in your local postgres)

Test

  • To execute tests, run yarn test

Coverage

  • To see test coverage report, run yarn coverage

Linting

  • To see lint issues, run yarn lint

Sonarqube

  • Before running sonarqube we have to run yarn coverage for code coverage and test cases report Go to file coverage/lcov.info, remove current directory path from all SF tag If you are outside the MSP network, please connect to VPN to generate the sonar report. * Run yarn sonar

Pull Request

  • git clone https://github.com/Marketron/radigio-proposal.git
  • git checkout develop
  • git branch -b <feature/branch_name>
    • for feature: feature/jira_story_number_feature_name (git branch -b feature/DIG_350_proposal_creation)
    • for bugfix: bugfix/jira_issue_number_issue_desc (git branch -b bugfix/DIG_351_validation_error_on_save)
  • Commit and push your changes to feature or bugfix branch.
  • Create a pull request in github and add a reviewer.

Swagger Docs

After running yarn start, swagger docs are accessible from browser using mentioned link. http://localhost:<HTTP_PORT>/api-docs/

Dependency Services

'radigio-metadata' and 'radigio-order' services should run along with proposal to get the meta data and create order respectively.

Packages

Run npm login to get access to @marketron packages.