Skip to content

Commit

Permalink
Merge branch 'master' into add_tti_measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
yashim-deriv committed Jul 12, 2022
2 parents 03b4485 + adbb1f7 commit ada17c1
Show file tree
Hide file tree
Showing 460 changed files with 32,504 additions and 38,287 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ commands:
- "packages/cfd/node_modules"
- "packages/indicators/node_modules"
- "packages/p2p/node_modules"
- "packages/reports/node_modules"
- "packages/shared/node_modules"
- "packages/trader/node_modules"
- "packages/translations/node_modules"
Expand Down Expand Up @@ -157,6 +158,27 @@ commands:
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: |
cd packages/core
npx wrangler pages publish dist/ --project-name=deriv-app-pages --branch=staging
echo "New staging website - http://staging.cf-pages-deriv-app.deriv.com"
publish_to_pages_production:
description: "Publish to cloudflare pages"
steps:
- run:
name: "Publish to cloudflare pages (production)"
command: |
cd packages/core
npx wrangler pages publish dist/ --project-name=deriv-app-pages --branch=main
echo "New website - http://cf-pages-deriv-app.deriv.com"
jobs:
build:
docker:
Expand Down Expand Up @@ -195,6 +217,10 @@ jobs:
- build
- versioning:
version_name: staging
- persist_to_workspace:
root: packages
paths:
- core
- docker_build_push
- k8s_deploy
- notify_slack
Expand All @@ -210,6 +236,10 @@ jobs:
- build
- versioning:
version_name: production
- persist_to_workspace:
root: packages
paths:
- core
- docker_build_push:
docker_image_latest_tag: latest
- k8s_deploy:
Expand All @@ -218,6 +248,26 @@ jobs:
environment:
NODE_ENV: staging

publish_cloudflare_staging:
docker:
- image: circleci/node:16.13.1-stretch
steps:
- attach_workspace:
at: packages
- publish_to_pages_staging
environment:
NODE_ENV: staging

publish_cloudflare_production:
docker:
- image: circleci/node:16.13.1-stretch
steps:
- attach_workspace:
at: packages
- publish_to_pages_production
environment:
NODE_ENV: staging

build_and_test:
docker:
- image: circleci/node:14.17.1-stretch
Expand Down Expand Up @@ -248,6 +298,12 @@ workflows:
filters:
branches:
only: /^master$/
- publish_cloudflare_staging:
requires:
- release_staging
filters:
branches:
only: /^master$/

release_production:
jobs:
Expand All @@ -258,6 +314,14 @@ workflows:
ignore: /.*/
tags:
only: /^production.*/
- publish_cloudflare_production:
requires:
- release_production
filters:
branches:
ignore: /.*/
tags:
only: /^production.*/

test:
jobs:
Expand Down
9 changes: 8 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
dataLayer: true,
texts_json: false,
},
ignorePatterns: ['**/dist/**/*.js', '**/lib/**/*.js'],
rules: {
camelcase: 0,
// semi : ['error', 'always'],
Expand Down Expand Up @@ -72,6 +73,7 @@ module.exports = {
'newlines-between': 'ignore',
},
],
'spaced-comment': 'off',
'import/prefer-default-export': 0,
'import/extensions': ['warn', 'never', { jsx: 'always', json: 'always' }],
'no-sequences': ['warn'],
Expand All @@ -86,7 +88,12 @@ module.exports = {
// 'react/jsx-indent-props' : ['error', 4],
// 'react/jsx-max-props-per-line' : ['error', { when: 'multiline' }],
// 'react/jsx-tag-spacing' : ['error', { closingSlash: 'never', beforeSelfClosing: 'always' }],
'react/prop-types': 0,
'react/prop-types': [
1,
{
skipUndeclared: true,
},
],
'react/self-closing-comp': 'error',
// 'react/sort-prop-types' : ['error', { ignoreCase: true, sortShapeProp: true }],
},
Expand Down
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@

/packages/trader/**/* @matin-binary @balakrishna-binary @akmal-binary

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

/packages/reports/**/* @matin-binary @balakrishna-binary

# ==============================================================
# deriv-app/publisher
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/generate_and_push_deriv_api_types.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generate and push Deriv API TypeScript types

This action takes Deriv API's JSON schema (published at https://github.com/binary-com/websockets/tree/gh-pages/config/v3) and converts it into consumable TypeScript types.
This action takes Deriv API's JSON schema (published at https://github.com/binary-com/websockets/tree/gh-pages/config/v3) and converts it into consumable TypeScript types.

If the action detects the contents of the generated `index.d.ts` file has changed, it will attempt to publish a new version of `@deriv/api-types` to the NPM registry (https://www.npmjs.com/package/@deriv/api-types).

Expand All @@ -10,5 +10,5 @@ After a new version has been published the action will automatically create a PR

Required GitHub secrets:

- `NPM_ACCESS_TOKEN`: To allow for automatic publishing of new version of `@deriv/api-types`
- `PERSONAL_ACCESS_TOKEN`: (GitHub PAT) To allow the action to authenticate with Git for git operations.
- `NPM_ACCESS_TOKEN`: To allow for automatic publishing of new version of `@deriv/api-types`
- `PERSONAL_ACCESS_TOKEN`: (GitHub PAT) To allow the action to authenticate with Git for git operations.
10 changes: 4 additions & 6 deletions .github/workflows/generate_and_push_deriv_api_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,22 @@ jobs:
# lerna: To allow us to bootstrap the project.
# json: To manually edit the target package's package.json
npm i -g lerna@latest json@latest
npm i -g lerna@latest json@latest npm@8
package_name="@deriv/api-types"
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"
git reset --hard master
# "Manually" bump the version in package.json to accommodate
# Lerna's flexibility (or its lack thereof).
json -I -f packages/appstore/package.json -e "this.dependencies[\"$package_name\"]=\"$new_version\"" -o json-4
json -I -f packages/cfd/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
for file in packages/**/package.json; do grep -q $package_name $file && json -I -f $file -e "this.dependencies[\"$package_name\"]=\"$new_version\"" -o json-4 || echo not found in $file ; done;
# We have to run "lerna bootstrap --no-ci" to generate a new
# package-lock.json ("npm run bootstrap" requires this).
lerna bootstrap --no-ci
npm run bootstrap
npm run bootstrap:dev
# Identify with Git, these values come from the shared Deriv FE account. https://github.com/DerivFE
git config --global user.name "DerivFE"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push_and_pull_crowdin_translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ This action will automatically extract strings from the Deriv.app repo and uploa

Required GitHub secrets:

- `NPM_ACCESS_TOKEN`: To allow for automatic publishing of new version of `@deriv/api-types`
- `PERSONAL_ACCESS_TOKEN`: (GitHub PAT) To allow the action to authenticate with Git for git operations.
- `CROWDIN_API_TOKEN`: To allow us to download and upload new language files to and from Crowdin.
- `NPM_ACCESS_TOKEN`: To allow for automatic publishing of new version of `@deriv/api-types`
- `PERSONAL_ACCESS_TOKEN`: (GitHub PAT) To allow the action to authenticate with Git for git operations.
- `CROWDIN_API_TOKEN`: To allow us to download and upload new language files to and from Crowdin.
Loading

0 comments on commit ada17c1

Please sign in to comment.