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..2bdf21ae7c94 --- /dev/null +++ b/.github/workflows/js-sdk-release-tool-pull-request-check.yml @@ -0,0 +1,41 @@ +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: 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/ + + - name: Build TypeScript + if: steps.check_files.outputs.files_exists == 'true' + run: npm run build + 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/ + + - 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/