From ba50de5d6607c184529534d9df15272ba632f22f Mon Sep 17 00:00:00 2001 From: "IceHe.Life" Date: Tue, 9 Aug 2022 11:23:05 +0800 Subject: [PATCH] refactor(test): inline link-mock-connectors.sh (#1746) * refactor(test): inline link-mock-connectors.sh * refactor(test): use lerna add instead of pnpm link * refactor(connector): align folder name with package name for connector-mock-email --- .github/workflows/integration-test.yml | 12 +++++++++--- link-mock-connectors.sh | 11 ----------- .../CHANGELOG.md | 0 .../README.md | 0 .../docs/config-template.json | 0 .../logo.svg | 0 .../package.json | 0 .../src/constant.ts | 0 .../src/index.ts | 0 .../src/types.ts | 0 .../tsconfig.base.json | 0 .../tsconfig.build.json | 0 .../tsconfig.json | 0 pnpm-lock.yaml | 2 +- 14 files changed, 10 insertions(+), 15 deletions(-) delete mode 100755 link-mock-connectors.sh rename packages/{connector-mock-mail => connector-mock-email}/CHANGELOG.md (100%) rename packages/{connector-mock-mail => connector-mock-email}/README.md (100%) rename packages/{connector-mock-mail => connector-mock-email}/docs/config-template.json (100%) rename packages/{connector-mock-mail => connector-mock-email}/logo.svg (100%) rename packages/{connector-mock-mail => connector-mock-email}/package.json (100%) rename packages/{connector-mock-mail => connector-mock-email}/src/constant.ts (100%) rename packages/{connector-mock-mail => connector-mock-email}/src/index.ts (100%) rename packages/{connector-mock-mail => connector-mock-email}/src/types.ts (100%) rename packages/{connector-mock-mail => connector-mock-email}/tsconfig.base.json (100%) rename packages/{connector-mock-mail => connector-mock-email}/tsconfig.build.json (100%) rename packages/{connector-mock-mail => connector-mock-email}/tsconfig.json (100%) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index dc3529c81..531f5aa3a 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -21,10 +21,16 @@ jobs: - name: Setup Node and pnpm uses: silverhand-io/actions-node-pnpm-run-steps@v1.2.3 - - name: Package + - name: Add the mock connectors for integration tests only run: | - ./link-mock-connectors.sh - ./package.sh + unset CI + unset GITHUB_ACTIONS + lerna add @logto/connector-mock-sms --scope=@logto/core + lerna add @logto/connector-mock-email --scope=@logto/core + lerna add @logto/connector-mock-social --scope=@logto/core + + - name: Package + run: ./package.sh - uses: actions/upload-artifact@v3 with: diff --git a/link-mock-connectors.sh b/link-mock-connectors.sh deleted file mode 100755 index dcce2b7c6..000000000 --- a/link-mock-connectors.sh +++ /dev/null @@ -1,11 +0,0 @@ -set -eo pipefail - -echo Link the mock connectors for integration tests only -cd packages/core -pnpm link @logto/connector-mock-sms -pnpm link @logto/connector-mock-email -pnpm link @logto/connector-mock-social -cd - - -echo Update the pnpm-lock.json -pnpm i --no-frozen-lockfile --lockfile-only diff --git a/packages/connector-mock-mail/CHANGELOG.md b/packages/connector-mock-email/CHANGELOG.md similarity index 100% rename from packages/connector-mock-mail/CHANGELOG.md rename to packages/connector-mock-email/CHANGELOG.md diff --git a/packages/connector-mock-mail/README.md b/packages/connector-mock-email/README.md similarity index 100% rename from packages/connector-mock-mail/README.md rename to packages/connector-mock-email/README.md diff --git a/packages/connector-mock-mail/docs/config-template.json b/packages/connector-mock-email/docs/config-template.json similarity index 100% rename from packages/connector-mock-mail/docs/config-template.json rename to packages/connector-mock-email/docs/config-template.json diff --git a/packages/connector-mock-mail/logo.svg b/packages/connector-mock-email/logo.svg similarity index 100% rename from packages/connector-mock-mail/logo.svg rename to packages/connector-mock-email/logo.svg diff --git a/packages/connector-mock-mail/package.json b/packages/connector-mock-email/package.json similarity index 100% rename from packages/connector-mock-mail/package.json rename to packages/connector-mock-email/package.json diff --git a/packages/connector-mock-mail/src/constant.ts b/packages/connector-mock-email/src/constant.ts similarity index 100% rename from packages/connector-mock-mail/src/constant.ts rename to packages/connector-mock-email/src/constant.ts diff --git a/packages/connector-mock-mail/src/index.ts b/packages/connector-mock-email/src/index.ts similarity index 100% rename from packages/connector-mock-mail/src/index.ts rename to packages/connector-mock-email/src/index.ts diff --git a/packages/connector-mock-mail/src/types.ts b/packages/connector-mock-email/src/types.ts similarity index 100% rename from packages/connector-mock-mail/src/types.ts rename to packages/connector-mock-email/src/types.ts diff --git a/packages/connector-mock-mail/tsconfig.base.json b/packages/connector-mock-email/tsconfig.base.json similarity index 100% rename from packages/connector-mock-mail/tsconfig.base.json rename to packages/connector-mock-email/tsconfig.base.json diff --git a/packages/connector-mock-mail/tsconfig.build.json b/packages/connector-mock-email/tsconfig.build.json similarity index 100% rename from packages/connector-mock-mail/tsconfig.build.json rename to packages/connector-mock-email/tsconfig.build.json diff --git a/packages/connector-mock-mail/tsconfig.json b/packages/connector-mock-email/tsconfig.json similarity index 100% rename from packages/connector-mock-mail/tsconfig.json rename to packages/connector-mock-email/tsconfig.json diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9fb31b63e..7af4c9260 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -445,7 +445,7 @@ importers: tsc-watch: 5.0.3_typescript@4.7.4 typescript: 4.7.4 - packages/connector-mock-mail: + packages/connector-mock-email: specifiers: '@logto/connector-types': ^1.0.0-beta.3 '@logto/shared': ^1.0.0-beta.3