Skip to content

Commit

Permalink
fix: merge conflicts fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nada-deriv committed Sep 27, 2023
2 parents ce6c6ec + 6e653fa commit 56d2bc6
Show file tree
Hide file tree
Showing 2,303 changed files with 85,774 additions and 83,285 deletions.
74 changes: 17 additions & 57 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ commands:
- "packages/hooks/node_modules"
- "packages/cfd/node_modules"
- "packages/indicators/node_modules"
- "packages/integration/node_modules"
- "packages/p2p/node_modules"
- "packages/reports/node_modules"
- "packages/shared/node_modules"
Expand All @@ -78,6 +79,7 @@ commands:
- "packages/translations/node_modules"
- "packages/utils/node_modules"
- "packages/analytics/node_modules"
- "packages/wallets/node_modules"
# VERIFY_CACHE_FOLDERS_END (DO NOT REMOVE)

build:
Expand Down Expand Up @@ -108,62 +110,15 @@ commands:
name: Tag
command: echo "<< parameters.version_name >>-$(date -u +"%Y-%m-%dT%H:%M:%SZ")" > packages/core/dist/version

docker_build_push:
description: "Build and Push image to docker hub"
parameters:
docker_image_latest_tag:
type: string
default: "latest-staging"
docker_image_name:
type: string
default: "deriv-app"
docker_file:
type: string
default: "Dockerfile"
steps:
- setup_remote_docker
- run:
name: Building docker image
command: |
TAG=${CIRCLE_TAG:-$CIRCLE_SHA1}
docker build -t ${DOCKHUB_ORGANISATION}/<< parameters.docker_image_name >>:${TAG} -t ${DOCKHUB_ORGANISATION}/<< parameters.docker_image_name >>:<< parameters.docker_image_latest_tag >> -f << parameters.docker_file >> .
- run:
name: Pushing Image to docker hub
command: |
TAG=${CIRCLE_TAG:-$CIRCLE_SHA1}
echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
docker push ${DOCKHUB_ORGANISATION}/<< parameters.docker_image_name >>:<< parameters.docker_image_latest_tag >>
docker push ${DOCKHUB_ORGANISATION}/<< parameters.docker_image_name >>:${TAG}
k8s_deploy:
description: "Deploy to k8s cluster"
parameters:
k8s_namespace:
type: string
default: "deriv-app-staging"
k8s_service:
type: string
default: "deriv-app"
steps:
- k8s/install-kubectl
- run:
name: Deploying to k8s cluster to namespace << parameters.k8s_namespace >>
command: |
TAG=${CIRCLE_TAG:-$CIRCLE_SHA1}
export NAMESPACE=<< parameters.k8s_namespace >>
git clone https://github.com/binary-com/devops-ci-scripts
cd devops-ci-scripts/k8s-build_tools
echo $CA_CRT | base64 --decode > ca.crt
./release.sh << parameters.k8s_service >> ${TAG}
publish_to_pages_staging:
description: "Publish to cloudflare pages"
steps:
- run:
name: "Publish to cloudflare pages (staging)"
command: |
npm i wrangler@2.0.19
npm i wrangler@3.1.0
cd packages/core
npx wrangler pages publish dist/ --project-name=deriv-app-pages --branch=staging
npx wrangler pages deploy dist/ --project-name=deriv-app-pages --branch=staging
echo "New staging website - http://staging.cf-pages-deriv-app.deriv.com"
publish_to_pages_production:
Expand All @@ -172,9 +127,9 @@ commands:
- run:
name: "Publish to cloudflare pages (production)"
command: |
npm i wrangler@2.0.19
npm i wrangler@3.1.0
cd packages/core
npx wrangler pages publish dist/ --project-name=deriv-app-pages --branch=main
npx wrangler pages deploy dist/ --project-name=deriv-app-pages --branch=main
echo "New website - http://cf-pages-deriv-app.deriv.com"
jobs:
Expand All @@ -201,8 +156,6 @@ jobs:
root: packages
paths:
- core
- docker_build_push
- k8s_deploy
- notify_slack
environment:
NODE_ENV: staging
Expand All @@ -221,10 +174,8 @@ jobs:
root: packages
paths:
- core
- docker_build_push:
docker_image_latest_tag: latest
- k8s_deploy:
k8s_namespace: "deriv-app-production"


- notify_slack
environment:
NODE_ENV: staging
Expand Down Expand Up @@ -271,9 +222,18 @@ jobs:
- run:
name: "Check TypeScript for @deriv/stores"
command: npx tsc --project packages/stores/tsconfig.json -noEmit
- run:
name: "Check TypeScript for @deriv/wallets"
command: npx tsc --project packages/wallets/tsconfig.json -noEmit
# - run:
# name: "Check TypeScript for @deriv/cashier"
# command: npx tsc --project packages/cashier/tsconfig.json -noEmit
- run:
name: "Check ESLint for @deriv/wallets"
command: npx eslint --fix --config packages/wallets/.eslintrc.js packages/wallets
- run:
name: "Check Stylelint for @deriv/wallets"
command: npx stylelint packages/wallets/**/*.scss
- run:
name: "Check tests for @deriv/hooks"
command: bash ./scripts/check-tests.sh packages/hooks/src
Expand Down
95 changes: 63 additions & 32 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@
# (just to make this file easier to understand)
# ================================================

# akmal-binary
# bahar-fs
# balakrishna-binary
# carol-binary
# matin-binary
# mehrzad-fs
# nijil-binary
# njazuli-deriv
# ali-hosseini-deriv
# amina-deriv
# balakrishna-deriv
# farrah-deriv
# hirad-deriv
# mahdiyeh-deriv
# maryia-deriv
# matin-deriv
# nijil-deriv
# prince-deriv
# sandeep-deriv
# yashim-deriv

######################################################################################################
Expand All @@ -63,76 +66,104 @@
# (in case no pattern matches a path in a PR - this should be treated as a bug and result in adding the path to CODEOWNERS)
# ==============================================================

* @matin-binary @nijil-binary @mehrzad-fs @balakrishna-binary

* @balakrishna-deriv @yashim-deriv


# ==============================================================
# deriv-app/account
# ==============================================================

/packages/account/**/* @yashim-deriv

/packages/account/**/* @matin-deriv @amina-deriv @maryia-deriv


# ==============================================================
# deriv-app/bot
# deriv-app/analytics
# ==============================================================

/packages/bot-skeleton/**/* @mehrzad-fs
/packages/bot-web-ui/**/* @mehrzad-fs
/packages/indicators/**/* @mehrzad-fs
/packages/analytics/**/* @ali-hosseini-deriv


# ==============================================================
# deriv-app/core
# deriv-app/appstore
# ==============================================================

/packages/core/**/* @balakrishna-binary @matin-binary
/packages/shared/**/* @balakrishna-binary @matin-binary
/packages/components/**/* @balakrishna-binary @matin-binary
/packages/translations/**/* @balakrishna-binary @matin-binary
/packages/appstore/**/* @matin-deriv @mahdiyeh-deriv @nijil-deriv


# ==============================================================
# deriv-app/p2p
# deriv-app/bot
# ==============================================================

/packages/p2p/**/* @carol-binary @nijil-binary
/packages/bot-skeleton/**/* @prince-deriv @sandeep-deriv
/packages/bot-web-ui/**/* @prince-deriv @sandeep-deriv
/packages/indicators/**/* @prince-deriv @sandeep-deriv


# ==============================================================
# deriv-app/cashier
# ==============================================================

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


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

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


# ==============================================================
# deriv-app/trader
# deriv-app/core
# ==============================================================

/packages/trader/**/* @matin-binary @balakrishna-binary @akmal-binary
/packages/api/**/* @ali-hosseini-deriv @matin-deriv
/packages/core/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/shared/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/components/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/translations/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/utils/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv
/packages/hooks/**/* @ali-hosseini-deriv @matin-deriv
/packages/stores/**/* @ali-hosseini-deriv @matin-deriv @maryia-deriv


# ==============================================================
# deriv-app/reports
# deriv-app/p2p
# ==============================================================

/packages/reports/**/* @matin-binary @balakrishna-binary
/packages/p2p/**/* @farrah-deriv @nijil-deriv


# ==============================================================
# deriv-app/publisher
# ==============================================================

/packages/publisher/**/* @nijil-binary
/packages/publisher/**/* @nijil-deriv


# ==============================================================
# deriv-app/appstore
# deriv-app/reports
# ==============================================================

/packages/reports/**/* @mahdiyeh-deriv @matin-deriv @maryia-deriv


# ==============================================================
# deriv-app/trader
# ==============================================================

/packages/trader/**/* @matin-deriv @maryia-deriv


# ==============================================================
# deriv-app/wallets
# ==============================================================

/packages/wallets/**/* @adrienne-deriv @thisyahlen-deriv @farhan-nurzi-deriv


# ==============================================================
# deriv-app/api
# ==============================================================

/packages/appstore/**/* @matin-binary @balakrishna-binary @njazuli-deriv @bahar-fs
/packages/api/**/* @adrienne-deriv @thisyahlen-deriv @farhan-nurzi-deriv
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ packages/appstore/lib/
packages/appstore/.out
.env
nx-cloud.env

test-results/
playwright-report/
playwright/.cache/
2 changes: 1 addition & 1 deletion .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
'shorthand-property-no-redundant-values': true,
'string-no-newline': true,
'time-min-milliseconds': 100,
'unit-allowed-list': ['fr', 'px', 'em', 'rem', '%', 'vw', 'vh', 'deg', 'ms', 's', 'dpcm'],
'unit-allowed-list': ['fr', 'px', 'em', 'rem', '%', 'svh', 'vw', 'vh', 'deg', 'ms', 's', 'dpcm'],
'value-keyword-case': 'lower',
},
extends: [
Expand Down
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ If preferable to use manual deployment, you can use [gh-pages](https://pages.git

**A.** Just as installing, except the `npm` command you'd run would be `npm uninstall` (shortened to `npm un`). e.g.: `lerna exec --scope=@deriv/translations -- npm un i18next`.
3. How do I run `npm ci` or equivalent (to add dependencies based on `package-lock.json`?
3. How do I run `npm ci` or equivalent to add dependencies based on `package-lock.json`?
**A.** You have two options:
Expand All @@ -280,15 +280,7 @@ If preferable to use manual deployment, you can use [gh-pages](https://pages.git

If you face this issue, simply run `sudo chown -R $(whoami) .` from the root of the project.

5. My build(s) fail and I can see it related to Node Sass (`node-sass`), what do I do?

**A.** This issue happens when your `node-sass` has its `binding.node` set to a version of node different from the current projects' one. Please try the following in order:
1. First run `npx lerna exec -- npm rebuild node-sass` and try building your packages again.
2. If that doesn't work, try `npm cache clean --force`, followed by `npm run clean`, and then `npm run bootstrap`.
3. And finally, if that doesn't work then you can read deeper into this [StackOverflow post](https://stackoverflow.com/questions/37986800).
6. How can I regenerate `package-lock.json` file?
5. How can I regenerate `package-lock.json` file?

We have added `bootstrap:dev` to scripts. If you are updating or adding a package and you want to regenerate `package-lock.json` file, you should run this command
`npm run bootstrap:dev`
4 changes: 4 additions & 0 deletions __mocks__/globals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Mock copy-anything module which is causing issues with jest in coveralls
jest.mock('copy-anything', () => ({
copy: jest.fn(),
}));
16 changes: 0 additions & 16 deletions end-to-end-test/.env.example

This file was deleted.

27 changes: 0 additions & 27 deletions end-to-end-test/.github/workflows/playwright.yml

This file was deleted.

4 changes: 0 additions & 4 deletions end-to-end-test/.gitignore

This file was deleted.

Loading

0 comments on commit 56d2bc6

Please sign in to comment.