From aac7581c9a952d1f7ae5c31549be2131b13db813 Mon Sep 17 00:00:00 2001 From: Wanpeng Li Date: Mon, 17 Jun 2024 14:06:56 +0800 Subject: [PATCH 1/4] add github action --- ...js-sdk-release-tool-pull-request-check.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/js-sdk-release-tool-pull-request-check.yml diff --git a/.github/workflows/js-sdk-release-tool-pull-request-check.yml b/.github/workflows/js-sdk-release-tool-pull-request-check.yml new file mode 100644 index 000000000000..741b465dcb56 --- /dev/null +++ b/.github/workflows/js-sdk-release-tool-pull-request-check.yml @@ -0,0 +1,24 @@ +name: Javascript SDK Release Tool Pull Request Check + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + name: Build and Test TypeScript + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: npm install + + - name: Build TypeScript + run: npm run build + + - name: Run Unit Tests + run: npm run test \ No newline at end of file From 17303f85f2234ea0479b93c40d9eac1796f89acb Mon Sep 17 00:00:00 2001 From: Wanpeng Li Date: Mon, 17 Jun 2024 14:12:50 +0800 Subject: [PATCH 2/4] fix working dir --- .github/workflows/js-sdk-release-tool-pull-request-check.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/js-sdk-release-tool-pull-request-check.yml b/.github/workflows/js-sdk-release-tool-pull-request-check.yml index 741b465dcb56..0a82629c62e0 100644 --- a/.github/workflows/js-sdk-release-tool-pull-request-check.yml +++ b/.github/workflows/js-sdk-release-tool-pull-request-check.yml @@ -16,9 +16,12 @@ jobs: - name: Install dependencies run: npm install + working-directory: ./tools/js-sdk-release-tools/ - name: Build TypeScript run: npm run build + working-directory: ./tools/js-sdk-release-tools/ - name: Run Unit Tests - run: npm run test \ No newline at end of file + run: npm run test + working-directory: ./tools/js-sdk-release-tools/ From d52b41c83f62802110e5b9b14d64ef409a6f08d1 Mon Sep 17 00:00:00 2001 From: Wanpeng Li Date: Mon, 17 Jun 2024 15:32:17 +0800 Subject: [PATCH 3/4] add to workflow --- .github/workflows/js-sdk-release-tool-pull-request-check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/js-sdk-release-tool-pull-request-check.yml b/.github/workflows/js-sdk-release-tool-pull-request-check.yml index 0a82629c62e0..2516a91af8d9 100644 --- a/.github/workflows/js-sdk-release-tool-pull-request-check.yml +++ b/.github/workflows/js-sdk-release-tool-pull-request-check.yml @@ -25,3 +25,7 @@ jobs: - name: Run Unit Tests run: npm run test working-directory: ./tools/js-sdk-release-tools/ + + - name: Run CI E2E Tests + run: npm run test:ci + working-directory: ./tools/js-sdk-release-tools/ From 3f71546cacf48392e580ff57f4020a6f18d2a635 Mon Sep 17 00:00:00 2001 From: Wanpeng Li Date: Wed, 19 Jun 2024 14:26:12 +0800 Subject: [PATCH 4/4] limit to run actual test in tool repo --- .../js-sdk-release-tool-pull-request-check.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/js-sdk-release-tool-pull-request-check.yml b/.github/workflows/js-sdk-release-tool-pull-request-check.yml index 2516a91af8d9..2bdf21ae7c94 100644 --- a/.github/workflows/js-sdk-release-tool-pull-request-check.yml +++ b/.github/workflows/js-sdk-release-tool-pull-request-check.yml @@ -14,18 +14,28 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: "tools/js-sdk-release-tools/package.json" + - name: Install dependencies + if: steps.check_files.outputs.files_exists == 'true' run: npm install - working-directory: ./tools/js-sdk-release-tools/ + working-directory: tools/js-sdk-release-tools/ - name: Build TypeScript + if: steps.check_files.outputs.files_exists == 'true' run: npm run build - working-directory: ./tools/js-sdk-release-tools/ + working-directory: tools/js-sdk-release-tools/ - name: Run Unit Tests + if: steps.check_files.outputs.files_exists == 'true' run: npm run test - working-directory: ./tools/js-sdk-release-tools/ + working-directory: tools/js-sdk-release-tools/ - name: Run CI E2E Tests + if: steps.check_files.outputs.files_exists == 'true' run: npm run test:ci - working-directory: ./tools/js-sdk-release-tools/ + working-directory: tools/js-sdk-release-tools/