Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
Merge branch 'dev' of github.com:erxes/erxes-community into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Wlkr123 committed Oct 17, 2023
2 parents a41a5e0 + e153e21 commit f79798d
Show file tree
Hide file tree
Showing 370 changed files with 23,502 additions and 907 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/plugin-polarissync-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Plugin polarissync Api CI

on:
push:
branches:
- dev
- staging
- build-test
paths:
- 'packages/api-utils/**'
- 'packages/api-plugin-template.erxes/**'
- 'packages/plugin-polarissync-api/**'
- '.github/workflows/plugin-polarissync-api.yaml'
pull_request:
branches:
- dev
- staging
- build-test
paths:
- 'packages/api-utils/**'
- 'packages/api-plugin-template.erxes/**'
- 'packages/plugin-polarissync-api/**'
- '.github/workflows/plugin-polarissync-api.yaml'

jobs:
api:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.17.x
uses: actions/setup-node@v3
with:
node-version: 18.17.x

# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-plugin-polarissync-api-${{ hashFiles('yarn.lock', 'plugin-polarissync-api/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-plugin-polarissync-api-
${{ runner.os }}-yarn-
- name: Build
run: |
cp -r builder dist
cd dist
yarn install
yarn build plugin polarissync
cd plugin-polarissync-api/.erxes
cd dist/main/.erxes/src
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd dist/plugin-polarissync-api/.erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker build -t erxes/plugin-polarissync-api:${GITHUB_REF#refs/heads/} -f Dockerfile .
docker push erxes/plugin-polarissync-api:${GITHUB_REF#refs/heads/}
87 changes: 87 additions & 0 deletions .github/workflows/plugin-polarissync-ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Plugin polarissync UI CI

on:
push:
branches:
- dev
- staging
- build-test
paths:
- "packages/erxes-ui/**"
- "packages/ui-plugin-template/**"
- "packages/ui-cards/**"
- "packages/ui-forms/**"
- "packages/ui-inbox/**"
- "packages/ui-knowledgebase/**"
- "packages/ui-leads/**"
- "packages/ui-log/**"
- "packages/ui-notifications/**"
- "packages/ui-products/**"
- "packages/ui-segments/**"
- "packages/ui-settings/**"
- "packages/ui-team/**"
- "packages/ui-tags/**"
- "packages/ui-polarissync/**"
- "packages/plugin-polarissync-ui/**"
- ".github/workflows/plugin-polarissync-ui.yaml"
pull_request:
branches:
- dev
- staging
- build-test
paths:
- "packages/erxes-ui/**"
- "packages/ui-plugin-template/**"
- "packages/ui-cards/**"
- "packages/ui-forms/**"
- "packages/ui-inbox/**"
- "packages/ui-knowledgebase/**"
- "packages/ui-leads/**"
- "packages/ui-log/**"
- "packages/ui-notifications/**"
- "packages/ui-products/**"
- "packages/ui-segments/**"
- "packages/ui-settings/**"
- "packages/ui-team/**"
- "packages/ui-tags/**"
- "packages/ui-polarissync/**"
- "packages/plugin-polarissync-ui/**"
- ".github/workflows/plugin-polarissync-ui.yaml"

jobs:
ui:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.17.x
uses: actions/setup-node@v3
with:
node-version: 18.17.x

- name: Build
run: |
yarn install --frozen-lockfile
cp -r packages/ui-plugin-template/.erxes packages/plugin-polarissync-ui/.erxes
cp -r packages/plugin-polarissync-ui/src packages/plugin-polarissync-ui/.erxes/plugin-src
cd packages/plugin-polarissync-ui
yarn install
yarn install-deps
yarn build
- name: Configure AWS credentials
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Deploy
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
run: |
tar -cf build.tar --directory=packages/plugin-polarissync-ui/.erxes/dist .
cp build.tar packages/plugin-polarissync-ui/.erxes/dist
rm -rf packages/plugin-polarissync-ui/.erxes/dist/*.js
aws s3 sync packages/plugin-polarissync-ui/.erxes/dist s3://erxes-${GITHUB_REF#refs/heads/}-plugins/uis/plugin-polarissync-ui --delete
66 changes: 66 additions & 0 deletions .github/workflows/plugin-savings-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Plugin savings Api CI

on:
push:
branches:
- dev
- staging
- build-test
paths:
- 'packages/api-utils/**'
- 'packages/api-plugin-template.erxes/**'
- 'packages/plugin-savings-api/**'
- '.github/workflows/plugin-savings-api.yaml'
pull_request:
branches:
- dev
- staging
- build-test
paths:
- 'packages/api-utils/**'
- 'packages/api-plugin-template.erxes/**'
- 'packages/plugin-savings-api/**'
- '.github/workflows/plugin-savings-api.yaml'

jobs:
api:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.17.x
uses: actions/setup-node@v3
with:
node-version: 18.17.x

# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-plugin-savings-api-${{ hashFiles('yarn.lock', 'plugin-savings-api/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-plugin-savings-api-
${{ runner.os }}-yarn-
- name: Build
run: |
cp -r builder dist
cd dist
yarn install
yarn build plugin savings
cd plugin-savings-api/.erxes
cd dist/main/.erxes/src
- name: Build docker image
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' )
run: |
cd dist/plugin-savings-api/.erxes
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker build -t erxes/plugin-savings-api:${GITHUB_REF#refs/heads/} -f Dockerfile .
docker push erxes/plugin-savings-api:${GITHUB_REF#refs/heads/}
87 changes: 87 additions & 0 deletions .github/workflows/plugin-savings-ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Plugin savings UI CI

on:
push:
branches:
- dev
- staging
- build-test
paths:
- "packages/erxes-ui/**"
- "packages/ui-plugin-template/**"
- "packages/ui-cards/**"
- "packages/ui-forms/**"
- "packages/ui-inbox/**"
- "packages/ui-knowledgebase/**"
- "packages/ui-leads/**"
- "packages/ui-log/**"
- "packages/ui-notifications/**"
- "packages/ui-products/**"
- "packages/ui-segments/**"
- "packages/ui-settings/**"
- "packages/ui-team/**"
- "packages/ui-tags/**"
- "packages/ui-savings/**"
- "packages/plugin-savings-ui/**"
- ".github/workflows/plugin-savings-ui.yaml"
pull_request:
branches:
- dev
- staging
- build-test
paths:
- "packages/erxes-ui/**"
- "packages/ui-plugin-template/**"
- "packages/ui-cards/**"
- "packages/ui-forms/**"
- "packages/ui-inbox/**"
- "packages/ui-knowledgebase/**"
- "packages/ui-leads/**"
- "packages/ui-log/**"
- "packages/ui-notifications/**"
- "packages/ui-products/**"
- "packages/ui-segments/**"
- "packages/ui-settings/**"
- "packages/ui-team/**"
- "packages/ui-tags/**"
- "packages/ui-savings/**"
- "packages/plugin-savings-ui/**"
- ".github/workflows/plugin-savings-ui.yaml"

jobs:
ui:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.17.x
uses: actions/setup-node@v3
with:
node-version: 18.17.x

- name: Build
run: |
yarn install --frozen-lockfile
cp -r packages/ui-plugin-template/.erxes packages/plugin-savings-ui/.erxes
cp -r packages/plugin-savings-ui/src packages/plugin-savings-ui/.erxes/plugin-src
cd packages/plugin-savings-ui
yarn install
yarn install-deps
yarn build
- name: Configure AWS credentials
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Deploy
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test')
run: |
tar -cf build.tar --directory=packages/plugin-savings-ui/.erxes/dist .
cp build.tar packages/plugin-savings-ui/.erxes/dist
rm -rf packages/plugin-savings-ui/.erxes/dist/*.js
aws s3 sync packages/plugin-savings-ui/.erxes/dist s3://erxes-${GITHUB_REF#refs/heads/}-plugins/uis/plugin-savings-ui --delete
4 changes: 4 additions & 0 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"erxes": "./bin/erxes.js",
"pm2": "./node_modules/pm2/bin/pm2"
},
"scripts": {
"start": "./bin/erxes.js dev",
"restart": "pm2 restart all"
},
"dependencies": {
"chalk": "^4.1.0",
"cli-progress": "^3.8.2",
Expand Down
1 change: 1 addition & 0 deletions client-portal/modules/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ export interface IProductCategory {
export interface IProduct {
_id: string;
name: string;
shortName: string;
type: string;
categoryId: string;
description: string;
Expand Down
10 changes: 7 additions & 3 deletions cypress/tests/contacts/ui/company.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { CLIENT_RENEG_LIMIT } = require("tls");

describe("Contacts", () => {
beforeEach(() => {
cy.exec('yarn run cypress:seedDB').wait(300);
Cypress.Cookies.debug(true);
cy.visit('/');
cy.clearCookies();
Expand All @@ -14,6 +15,9 @@ describe("Contacts", () => {
const random = Math.random().toString(36).slice(2)

it("add company", () => {
const seed = cy.exec('yarn run cypress:seedDB').wait(300);

console.log(seed);

cy.get('i[icon = "plus-circle"]', { timeout: 300000 }).click();

Expand All @@ -31,7 +35,7 @@ describe("Contacts", () => {
.click();
})

it("set tag company", () => {
it.skip("set tag company", () => {

cy.get("#companiesCheckBox",{ timeout: 300000 }).eq(0).click();

Expand All @@ -46,7 +50,7 @@ describe("Contacts", () => {
cy.get('button[icon="tag-alt"]').click();
})

it("remove company", () => {
it.skip("remove company", () => {

cy.contains(random, { timeout: 300000 })
.parent()
Expand Down
Loading

0 comments on commit f79798d

Please sign in to comment.