Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
akmal-deriv committed Jun 16, 2022
1 parent 9a31ac2 commit 4bead99
Show file tree
Hide file tree
Showing 1,156 changed files with 110,631 additions and 50,988 deletions.
66 changes: 3 additions & 63 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ commands:
- node-v{{ .Environment.CACHE_VERSION }}-{{ checksum "CACHE_KEY1" }}
- run:
name: "Install npm packages"
no_output_timeout: 30m
command: |
npm run bootstrap
# if [ -d "./node_modules" ]; then
Expand All @@ -60,12 +61,13 @@ commands:
# VERIFY_CACHE_FOLDERS_START (DO NOT REMOVE)
- "node_modules"
- "packages/account/node_modules"
- "packages/appstore/node_modules"
- "packages/bot-skeleton/node_modules"
- "packages/bot-web-ui/node_modules"
- "packages/cashier/node_modules"
- "packages/components/node_modules"
- "packages/core/node_modules"
- "packages/dashboard/node_modules"
- "packages/cfd/node_modules"
- "packages/indicators/node_modules"
- "packages/p2p/node_modules"
- "packages/shared/node_modules"
Expand All @@ -80,13 +82,6 @@ commands:
name: "Build all packages"
command: npm run build

build_dashboard:
description: "Build dashboard"
steps:
- run:
name: "Build all packages for deriv dashboard"
command: npm run build:dashboard

build_storybook:
description: "Build storybook"
steps:
Expand Down Expand Up @@ -172,14 +167,6 @@ jobs:
- npm_install_from_cache
- build

build_dashboard:
docker:
- image: circleci/node:14.17.1-stretch
steps:
- git_checkout_from_cache
- npm_install_from_cache
- build_dashboard

release_storybook:
docker:
- image: circleci/node:14.17.1-stretch
Expand Down Expand Up @@ -215,22 +202,6 @@ jobs:
environment:
NODE_ENV: staging

release_staging_dashboard:
docker:
- image: circleci/node:14.17.1-stretch
steps:
- git_checkout_from_cache
- npm_install_from_cache
- build_dashboard
- versioning:
version_name: staging-dashboard
- docker_build_push:
docker_image_name: deriv-app-dashboard
docker_image_latest_tag: latest-staging-dashboard
- notify_slack
environment:
NODE_ENV: staging

release_production:
docker:
- image: circleci/node:14.17.1-stretch
Expand All @@ -248,22 +219,6 @@ jobs:
environment:
NODE_ENV: staging

release_production_dashboard:
docker:
- image: circleci/node:14.17.1-stretch
steps:
- git_checkout_from_cache
- npm_install_from_cache
- build_dashboard
- versioning:
version_name: production-dashboard
- docker_build_push:
docker_image_name: deriv-app-dashboard
docker_image_latest_tag: latest
- notify_slack
environment:
NODE_ENV: staging

build_and_test:
docker:
- image: circleci/node:14.17.1-stretch
Expand Down Expand Up @@ -294,11 +249,6 @@ workflows:
filters:
branches:
only: /^master$/
- release_staging_dashboard:
context: binary-frontend-artifact-upload
filters:
branches:
only: /^master$/

release_production:
jobs:
Expand All @@ -310,16 +260,6 @@ workflows:
tags:
only: /^production.*/

release_production_dashboard:
jobs:
- release_production_dashboard:
context: binary-frontend-artifact-upload
filters:
branches:
ignore: /.*/
tags:
only: /^dashboard-production.*/

test:
jobs:
- build_and_test:
Expand Down
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,22 @@ module.exports = {
react: {
version: '16',
},
'import/resolver': {
typescript: {}, // this loads <rootdir>/tsconfig.json to eslint
},
},
overrides: [
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
{
files: ['*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
],
},
],
};
18 changes: 12 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# matin-binary
# mehrzad-fs
# nijil-binary
# nikolai-deriv
# njazuli-deriv
# yashim-deriv

######################################################################################################
Expand Down Expand Up @@ -79,9 +79,9 @@
# deriv-app/bot
# ==============================================================

/packages/bot-skeleton/**/* @mehrzad-fs @nikolai-deriv
/packages/bot-web-ui/**/* @mehrzad-fs @nikolai-deriv
/packages/indicators/**/* @mehrzad-fs @nikolai-deriv
/packages/bot-skeleton/**/* @mehrzad-fs
/packages/bot-web-ui/**/* @mehrzad-fs
/packages/indicators/**/* @mehrzad-fs


# ==============================================================
Expand All @@ -107,6 +107,12 @@

/packages/cashier/**/* @bahar-fs @nijil-binary

# ==============================================================
# deriv-app/cfd
# ==============================================================

/packages/cfd/**/* @balakrishna-binary @matin-binary @yashim-deriv

# ==============================================================
# deriv-app/trader
# ==============================================================
Expand All @@ -122,7 +128,7 @@
/packages/publisher/**/* @nijil-binary

# ==============================================================
# deriv-app/dashboard
# deriv-app/appstore
# ==============================================================

/packages/dashboard/**/* @matin-binary @akmal-binary
/packages/appstore/**/* @matin-binary @balakrishna-binary @njazuli-deriv @bahar-fs
4 changes: 2 additions & 2 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
labelPRBasedOnFilePath:
Account:
- packages/account/**/*
AppStore:
- packages/appstore/**/*
Bot:
- packages/bot-*/**/*
Components:
- packages/components/**/*
Core:
- packages/core/**/*
Dashboard:
- packages/dashboard/**/*
P2P:
- packages/p2p/**/*
Shared:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Codecov Workflow
on:
pull_request:
branches:
- '**'
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: install, bootstrap and make test coverage
run: |
npm install
npm run bootstrap
npm run build
npm run test:jest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
directory: ./coverage
fail_ci_if_error: true
files: ./coverage/lcov.info
name: codecov-umbrella
verbose: true
6 changes: 3 additions & 3 deletions .github/workflows/generate_and_push_deriv_api_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ jobs:
cd deriv-app
package_name="@deriv/api-types"
old_version=$(json -f packages/dashboard/package.json -a devDependencies."$package_name")
old_version=$(json -f packages/appstore/package.json -a dependencies."$package_name")
safe_old_version=$(echo $old_version | sed 's/[^a-zA-Z0-9.]//g')
git checkout -b "$package_name"
# "Manually" bump the version in package.json to accommodate
# Lerna's flexibility (or its lack thereof).
json -I -f packages/dashboard/package.json -e "this.devDependencies[\"$package_name\"]=\"$new_version\"" -o json-4
rm packages/dashboard/package-lock.json
json -I -f packages/appstore/package.json -e "this.dependencies[\"$package_name\"]=\"$new_version\"" -o json-4
json -I -f packages/trader/package.json -e "this.dependencies[\"$package_name\"]=\"$new_version\"" -o json-4
# We have to run "lerna bootstrap --no-ci" to generate a new
# package-lock.json ("npm run bootstrap" requires this).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_app_id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Capture Vercel preview URL
id: vercel_preview_url
uses: binary-com/vercel-preview-url-action@v0.0.3
uses: binary-com/vercel-preview-url-action@v1.0.5
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Deriv App ID for deployment Preview URL
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ packages/account/lib/
packages/components/.out
packages/components/src/components/icon/icons-manifest.js
packages/p2p/lib/
packages/dashboard/lib/
packages/appstore/dist/
packages/appstore/lib/
.env

2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"printWidth": 120,
"jsxSingleQuote": true,
"arrowParens": "avoid",
"proseWrap": "preserve",
"proseWrap": "preserve"
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This repository contains the various platforms of the Deriv application.
![CircleCI](https://img.shields.io/circleci/build/github/binary-com/deriv-app) ![Prerequisite](https://img.shields.io/badge/node-%3E%3D14.17.1-blue.svg) ![Prerequisite](https://img.shields.io/badge/npm-%3E%3D7.21.0-blue.svg) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
![Sonar Tech Debt](https://img.shields.io/sonar/tech_debt/binary-com_deriv-app?server=https%3A%2F%2Fsonarcloud.io)
![Sonar Violations (short format)](https://img.shields.io/sonar/violations/binary-com_deriv-app?server=https%3A%2F%2Fsonarcloud.io)
[![codecov](https://codecov.io/gh/binary-com/deriv-app/branch/dev/graph/badge.svg?token=LClg2rlZ4z)](https://codecov.io/gh/binary-com/deriv-app)

**In this document**:

Expand Down Expand Up @@ -104,10 +105,10 @@ Before running or contribute to this project, you need to have the setup of the

| Package name | Docs | Version |
| :------------- | :------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------- |
| `Appstore` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/appstore/README.md) | - |
| `Bot` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/bot/README.md) | - |
| `Components` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/components/README.md) | - |
| `Core` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/core/README.md) | - |
| `Dashboard` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/dashboard/README.md) | [![npm](https://img.shields.io/npm/v/@deriv/dashboard.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@deriv/dashboard) |
| `P2P` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/p2p/README.md) | [![npm](https://img.shields.io/npm/v/@deriv/p2p.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@deriv/p2p) |
| `Shared` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/shared/README.md) | - |
| `Trader` | [![](https://img.shields.io/badge/API%20Docs-readme-orange.svg?style=flat-square)](packages/trader/README.md) | - |
Expand Down
Loading

0 comments on commit 4bead99

Please sign in to comment.